[R] Can't rsync extsoft/3.6 when compiling R 3.6

2019-05-01 Thread Shuguang Sun
Hi all, When I try to compile R 3.6 in windows 10 in Rtools35, it raised the error message: --8<---cut here---start->8--- make rsync-extsoft (mkdir -p ../../extsoft; \ cd ../../extsoft; \ rsync --timeout=60 -rcvp --delete cran.r-project.org::CRAN/bin/windows/e

Re: [R] Fwd: Re: transpose and split dataframe

2019-05-01 Thread Matthew
Thank you very much, David and Jim for your work and solutions. I have been working through both of them to better learn R. They both proceed through a similar logic except David's starts with a character matrix and Jim's with a dataframe, and both end with equivalent dataframes (  identical(tm

[R] Referencing multiple lists in api loop call

2019-05-01 Thread Graeme Davidson
Hi all, I am working with a google analytics api, and need to pull out data on multiple views (n = 11, basically different databases with the same data types and formats). However, in addition to this I need to specify the beginning and end date separately, in to get each months data, and I n

Re: [R] Passing formula as parameter to `lm` within `sapply` causes error [BUG?]

2019-05-01 Thread peter dalgaard
Or, following up on the hint by Duncan, this works too > sapply(unique(data[[st]]), function(s){ + environment(FO) <- environment() + summary(lm(FO, data, data[[st]] == s, data[[ws]]))$coef[1, ] + }) # !!! [,1] [,2] [,3] Estimate 1.6269038 -0.1404174 -0.01033

Re: [R] Passing formula as parameter to `lm` within `sapply` causes error [BUG?]

2019-05-01 Thread Jens Heumann
Thanks a lot for your hint, David. It finally worked doing: > sapply(unique(data[[st]]), function(s) + summary(do.call("lm", list(FO, data, data[[st]] == s, + data[[ws]])))$coef[1, ]) [,1] [,2] [,3] Estimate 1.6269038 -0.1404174 -0.01