Closed cmbarton closed 3 years ago
Can you provide a reproducible example? They show up in the plots and summaries for me, but perhaps you're talking about somewhere else.
didn't work yesterday but works today. Yesterday, I was just getting date1, date2, etc for the labels even after I set the ids column. I am noticing that the plot works very very slowly, especially if the date curves are turned on. I have a column with 28 dates and it takes a very long time to plot
Glad it works today! Can you give an example of where it's working slowly? I'll see if it can be sped up.
Andy,
Here is the data set from the 2017 paper of mine and the new code (with ggplot calls now) I used to get the attached graphs. Without the date curves, the plot takes a second or two to render. With the curves, it takes several minutes.
As I noted in GitHub, I have the newest Mac OS (11.3.1), R, and bchron. I have an older but still useful Mac with 64 Gb RAM and a 4.2 GHz Quad-Core i7 processor (4 actual and 8 virtual cores).
Michael
Code:
LR.bchron = with(
lariera.dates2,
Bchronology(
ages=C14mean,
ageSds = C14SD,
calCurves = calib.curve,
positions = depth,
extractDate = 6000,
positionThicknesses = thickness,
jitterPositions = T,
predictPositions = seq(.2,2.6, by=.1),
ids = level))
plot(LR.bchron, dateHeight = .1) + labs(x='calibrated age BP', y='depth (m below surface)', title='La Riera Age Depth Model' ) + geom_hline(yintercept = unique(lariera.dates2$depth), lwd=.1, lty = "solid", col='blue') + annotate("text", x=5000, y= unique(lariera.dates2$depth)-.05, label = paste("level ", unique(lariera.dates2$level.num)), size = 3, color="blue") + xlim(30000,5000) + theme_bw(base_size = 14) + theme(panel.grid.major.y = element_blank(), panel.grid.minor.y = element_blank())
Here is the plotted result.
Here is the data file:
On May 13, 2021, at 8:32 AM, Andrew Parnell @.***> wrote:
Can you provide a reproducible example? They show up in the plots and summaries for me, but perhaps you're talking about somewhere else.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/andrewcparnell/Bchron/issues/24#issuecomment-840641586, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACENLLZJY5N2GTLYFHUPTFTTNPWKHANCNFSM44ZTHQOQ.
Hi. Finally fixed the other one and getting round to this one - but I can't seem to see the data file? Can you re-send. (Or just use dput
as advised previously).
Andrew
Here you go. I guess I can't put an RDA on GitHub.
Michael
On Jun 3, 2021, at 4:07 AM, Andrew Parnell @.***> wrote:
Hi. Finally fixed the other one and getting round to this one - but I can't seem to see the data file? Can you re-send. (Or just use dput as advised previously).
Andrew
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/andrewcparnell/Bchron/issues/24#issuecomment-853786509, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACENLL4GDGMETDUOVPYVE5LTQ5O6JANCNFSM44ZTHQOQ.
I see my email went to GitHub instead of you and I can't send an RDA. Here it is zipped to make it acceptable. lariera_dates.rda.zip
OK had a look through this data set. Looks like you've got non-unique IDs which is causing it to crash when plotting. I've updated Bchron to check for non-unique IDs and report an error.
Let me know if this fixed it or not.
Andrew
OK. Thanks much. I could not use the cool tricks you showed me for a double axis graph any more because they depended on using R base plotting routines and the new version uses ggplot2. I worked out an alternative way to do it.
Michael
On Jun 8, 2021, at 9:46 AM, Andrew Parnell @.***> wrote:
OK had a look through this data set. Looks like you've got non-unique IDs which is causing it to crash when plotting. I've updated Bchron to check for non-unique IDs and report an error.
Let me know if this fixed it or not.
Andrew
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/andrewcparnell/Bchron/issues/24#issuecomment-856928361, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACENLL3O4ZHMWGEWLAVAVBLTRZCOXANCNFSM44ZTHQOQ.
OK glad to hear it's all working for you now. Let me know if anything changes.
When I set ids (to a factor) it doesn't seem to show up in the bchronology object produced anywhere.