[R] Using rmarkdown with many plots created in a loop

2018-08-16 Thread MacQueen, Don via R-help
I would appreciate some suggestions of a good way to prepare a report using rmarkdown, in which I loop through subsets of a data set, creating a plot of each subset, and interspersing among the figures some text relevant to each figure. One way is to have an R script write the rmd file, then ren

Re: [R] How deep into function calls does trycatch() work

2018-08-16 Thread Peter Langfelder
AFAIK a try or tryCatch will intercept the error thrown by stop(). Why not try it and see if it works? Peter On Thu, Aug 16, 2018 at 1:05 PM Roy Mendelssohn - NOAA Federal via R-help wrote: > > Hi All: > > I am using another package in a project I have. Because of that, I have no > control on h

[R] How deep into function calls does trycatch() work

2018-08-16 Thread Roy Mendelssohn - NOAA Federal via R-help
Hi All: I am using another package in a project I have. Because of that, I have no control on how that package behaves or what it returns. This package has a function foo() that calls httr::GET(), and if it gets an error from httr::GET() it calls the following routine: err_handle2 <- func

Re: [R] cumulate of snow cumulates from daily values of different automatic stations for some time intervals

2018-08-16 Thread Stefano Sofia
Hi Jim. Thank you for your help. I found very useful cum_snow and cum_list, but I decided to manage the list and dates in a different way. First of all I decided to deal with a unique data frame (called df_CFS) where I attached all the 10 data frames, and instead to build a list with the 10 diff

Re: [R] Ordering of facet_wrap() panels

2018-08-16 Thread Stats Student
Understood. Will review the docs again. My data is from an external source which, among other things, ensures that it's sorted correctly. I was asking for a way to have ggplot use the ordering in place, instead of re-ordering everything. Apologies if it wasn't clear from the original post. A