Re: [R] Strange behaviour of R?

2020-01-16 Thread Rainer M Krug
Hi > On 17 Jan 2020, at 08:33, Sigbert Klinke > wrote: > > Hi, > > I wrote a function like > > test <- function(FUN, args) { > print(FUN) > FUN(args) > } > > When I call it lieke this > > test(mean, 1:10) > test(NULL, 1:10) > > then the second call still

[R] Strange behaviour of R?

2020-01-16 Thread Sigbert Klinke
Hi, I wrote a function like test <- function(FUN, args) { print(FUN) FUN(args) } When I call it lieke this test(mean, 1:10) test(NULL, 1:10) then the second call still uses mean, although I set FUN to NULL. Is that ok? Actually, I used something like test(mean, list(x=1:10,

Re: [R] Extracting a particular column from list

2020-01-16 Thread Rui Barradas
Hello, Inline. Às 22:03 de 16/01/20, Mark Leeds escreveu: I nominate the last sentence of Rolf's comment as a fortune. Second. Rui Barradas On Thu, Jan 16, 2020 at 3:48 PM Rolf Turner > wrote: On 17/01/20 1:55 am, Rui Barradas wrote: >

Re: [R] Extracting a particular column from list

2020-01-16 Thread Rolf Turner
On 17/01/20 1:55 am, Rui Barradas wrote: Hello, What column and what list? Please post a reproducible example, see the link at the bottom of this mail and  [1], [2], [3]. [1] https://cran.r-project.org/web/packages/reprex/index.html [2]

Re: [R] citing old(er) versions of packages

2020-01-16 Thread Marc Schwartz via R-help
> On Jan 16, 2020, at 12:03 PM, Ivan Calandra wrote: > > Dear useRs, > > I want to cite the packages I have used in my analyses for a paper. I > have recorded through sessionInfo() which packages and which versions I > used for a given analysis. > > I know how to cite a package using the

[R] citing old(er) versions of packages

2020-01-16 Thread Ivan Calandra
Dear useRs, I want to cite the packages I have used in my analyses for a paper. I have recorded through sessionInfo() which packages and which versions I used for a given analysis. I know how to cite a package using the citation() function, but the problem is that in the meantime, I have updated

Re: [R] How to save multiple values of a variable in a json file in R

2020-01-16 Thread Ioanna Ioannou
ok, my problem is the follwoing a<- read_json(json_file) a$fields$geo_applicability$fields$countries[[1]]$fields$name this was i can see the name of a single country reported first in the json. HOwever, i need to save all 59. My worry is that i have multiple files that i need to read and in

[R] How to save multiple values of a variable in a json file in R

2020-01-16 Thread Ioanna Ioannou
hello everyone, and happy new year! I have this problem: I want to save the name of the 'countries', the 'taxonomy_gem' and the 'minimum_im' and 'maximum_im' . The problem is that there are several names of countries. How can i transfer the information from the json file to an R data.frame?

Re: [R] Extracting a particular column from list

2020-01-16 Thread Rui Barradas
Hello, What column and what list? Please post a reproducible example, see the link at the bottom of this mail and [1], [2], [3]. [1] https://cran.r-project.org/web/packages/reprex/index.html [2] https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example [3]

Re: [R] Reporting missing dates

2020-01-16 Thread David Winsemius
Looks reasonable and efficient. There is a seq.Date function that would be implicitly selected by the S3 class dispatch rules David Sent from my iPhone > On Jan 16, 2020, at 4:28 AM, Jeff Reichman wrote: > > R-help Forum > > I have a 20 year data set and I am looking for a way to find

[R] Extracting a particular column from list

2020-01-16 Thread Faheem Jan via R-help
Hi. How to extract a column from the list.. I will be thanks full..  Sent from Yahoo Mail on Android [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Reporting missing dates

2020-01-16 Thread Enrico Schumann
Quoting Duncan Murdoch : On 15/01/2020 4:28 p.m., Jeff Reichman wrote: R-help Forum I have a 20 year data set and I am looking for a way to find missing dates. I wrote this and its works, but am wounding if there is a better way? d <- c('2020-01-01', '2020-01-02', '2020-01-04',

Re: [R] Reporting missing dates

2020-01-16 Thread Duncan Murdoch
On 15/01/2020 4:28 p.m., Jeff Reichman wrote: R-help Forum I have a 20 year data set and I am looking for a way to find missing dates. I wrote this and its works, but am wounding if there is a better way? d <- c('2020-01-01', '2020-01-02', '2020-01-04', '2020-01-05') d <- as.Date(d) date_range

Re: [R] Reporting missing dates

2020-01-16 Thread PIKAL Petr
Your approach is quite simple and works well Another option is as.Date(setdiff(date_range, d), origin="1970-01-01") but I do not believe that it has some advantage above yours. Cheers Petr > -Original Message- > From: R-help On Behalf Of Jeff Reichman > Sent: Wednesday, January 15,

[R] Course: Zero-inflated GAMs and GAMMs for the analysis of spatial and spatial-temporal correlated data using R-INLA

2020-01-16 Thread Highland Statistics Ltd
We would like to announce the following statistics course. Course: Zero-inflated GAMs and GAMMs for the analysis of spatial and spatial-temporal correlated data using R-INLA Where and when: NIOZ, Texel, The Netherlands. 20 - 24 April 2020 Course website: