[R] Anchoring Vignettes
Hello dear R-help, I tried to use the code of anchors.mexchn2, but when I tried to trim.data(), I was encountered with the error,more details is as follows: > data(selfan) > fo <- list(self = xsay ~ 1, vign = cbind( xsay1,xsay2) ~ 1) > ra <- anchors( fo, data=selfan, method="C") > selfan.cut <- trim.data( selfan, ra) Error in if ((anchors$method == "chopit" && anchors$delete != "listwise")) stop(paste("trim.data() not defined for anchors.data objects created with \n", : missing value where TRUE/FALSE needed How to solve this problem? Thanks in advance, Soukeiu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] About reshape dataset
On 10/22/2016 10:52 AM, lily li wrote: The code I'm using is: require(reshape) DF2 = melt(DF, id.vars = c('year', 'month', 'day'), measure.vars = c('site1_elev', 'site2_elev', 'site1_temp', 'site2_temp')) But it didn't work. On Sat, Oct 22, 2016 at 11:50 AM, lily liwrote: Hi R users, I want to melt a dataframe, but it mixed up the variables. DF is the original dataset: year month day site1_elev site2_elev site1_temp site2_temp 2000 561300 150020 21 2000 571300 150021 22 2000 581300 150019 20 2000 591300 150022 23 How to melt the dataframe and get the following dataset? Thanks for your help. year month day siteID elev temp 20005 6 1 130020 20005 6 2 150021 20005 7 1 130021 20005 7 2 150022 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. I am sure someone will come along with a "better" answer, but I played with this a bit and this is what I came up with. After running your code I ran DF2$site <- substr(as.character(DF2$variable),1,5) DF2$var <- substr(as.character(DF2$variable),7,10) DF3 <- cast(DF2,year + month + day + site ~ var ) Hope this is helpful, Dan -- Daniel Nordlund Port Townsend, WA USA __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] About reshape dataset
The code I'm using is: require(reshape) DF2 = melt(DF, id.vars = c('year', 'month', 'day'), measure.vars = c('site1_elev', 'site2_elev', 'site1_temp', 'site2_temp')) But it didn't work. On Sat, Oct 22, 2016 at 11:50 AM, lily liwrote: > Hi R users, > > I want to melt a dataframe, but it mixed up the variables. > > DF is the original dataset: > year month day site1_elev site2_elev site1_temp site2_temp > 2000 561300 150020 > 21 > 2000 571300 150021 22 > 2000 581300 150019 20 > 2000 591300 150022 23 > > How to melt the dataframe and get the following dataset? Thanks for your > help. > > year month day siteID elev temp > 20005 6 1 130020 > 20005 6 2 150021 > 20005 7 1 130021 > 20005 7 2 150022 > > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] About reshape dataset
Hi R users, I want to melt a dataframe, but it mixed up the variables. DF is the original dataset: year month day site1_elev site2_elev site1_temp site2_temp 2000 561300 150020 21 2000 571300 150021 22 2000 581300 150019 20 2000 591300 150022 23 How to melt the dataframe and get the following dataset? Thanks for your help. year month day siteID elev temp 20005 6 1 130020 20005 6 2 150021 20005 7 1 130021 20005 7 2 150022 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] cdf in R give probability of random variable
> peter dalgaard> on Fri, 21 Oct 2016 22:10:22 +0200 writes: >> On 21 Oct 2016, at 20:23 , peter dalgaard >> wrote: >> >> In both cases it works out nicer if you do >> >> names(px) <- x >> barplot(px) > Um, unless of course you want the cdf as a step function, > in which case check the help page for plot for possible > values of the type= argument. and if it is not homework, (or even then ;-) just use plot(ecdf(x)) Martin Maechler, ETH Zurich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] gtools Gator infected...
Thanks a lot - I have asked enigmasoftware to go and check up on this - and they'll also see your letter! BW Troels Den 22-10-2016 kl. 13:12 skrev Bob Rudis: I think your tool is a bit overzealous. VirusTotal - https://virustotal.com/en/file/5fd1b2fc5c061c0836a70cbad620893a89a27d9251358a5c42c3e49113c9456c/analysis/ & https://virustotal.com/en/file/e133ebf5001e1e991f1f6b425adcfbab170fe3c02656e3a697a5ebea961e909c/analysis/ - shows no sign of any malware in the 32-bit DLLor 64-bit DLL (I tested r-release: gtools_3.5.0.zip) On Sat, Oct 22, 2016 at 4:50 AM, Troels Ringwrote: Hi friends - just installed gtools to make rstan run. Was rapidly informed by Spyhunter 4 that gtools.dll harboured Gator. Spyhunter 4 then aggressively removed Gator - and gtools were gone and rstan out of function. Kind of sorry about this. Best wishes Troels Ring Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] gtools Gator infected...
I think your tool is a bit overzealous. VirusTotal - https://virustotal.com/en/file/5fd1b2fc5c061c0836a70cbad620893a89a27d9251358a5c42c3e49113c9456c/analysis/ & https://virustotal.com/en/file/e133ebf5001e1e991f1f6b425adcfbab170fe3c02656e3a697a5ebea961e909c/analysis/ - shows no sign of any malware in the 32-bit DLLor 64-bit DLL (I tested r-release: gtools_3.5.0.zip) On Sat, Oct 22, 2016 at 4:50 AM, Troels Ringwrote: > Hi friends - just installed gtools to make rstan run. Was rapidly informed > by Spyhunter 4 that gtools.dll harboured Gator. Spyhunter 4 then > aggressively removed Gator - and gtools were gone and rstan out of function. > Kind of sorry about this. > > Best wishes > > Troels Ring > > Aalborg, Denmark > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] gtools Gator infected...
Hi friends - just installed gtools to make rstan run. Was rapidly informed by Spyhunter 4 that gtools.dll harboured Gator. Spyhunter 4 then aggressively removed Gator - and gtools were gone and rstan out of function. Kind of sorry about this. Best wishes Troels Ring Aalborg, Denmark __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.