Re: [R] object of type 'closure' is not subsettable

2014-08-06 Thread Frederic Ntirenganya
Thanks for the idea. I tried by changing avoiding confusion about boxplot function but I still have the same problem. > boxplot(bungoma_rain, > names=c("J","F","M","A","M","J","J","A","S","O","N","D"),width = > table(boxplot$Month))Error in boxplot$Month : object of type 'closure' is not > sub

Re: [R] object of type 'closure' is not subsettable

2014-08-06 Thread Frederic Ntirenganya
The major problem is that I am using the same code in another dataset and it is working perfectly. I do not understand why in this dataset (bungoma_rain) is not working. The following is the new code I have: ## reading the data rm(list=ls(all=TRUE)) Bungoma=read.csv("/home/fredo/Documents/Maseno/

Re: [R] object of type 'closure' is not subsettable

2014-08-06 Thread Frederic Ntirenganya
Dear All, Thanks for your help. My problem is solved. I was using the boxplot as a name and function at the same time. Beast wishes, Fredo. On Wed, Aug 6, 2014 at 9:39 AM, Frederic Ntirenganya wrote: > The major problem is that I am using the same code in another dataset and > it is worki

Re: [R] How to optimizing the code for calculating the launch time

2014-08-06 Thread David McPearson
On Tue, 5 Aug 2014 09:51:56 +0300 Lingyi Ma wrote > My dataset: > > Item_IdYear_Month > B65623262 201204 > B58279745 201204 > B33671102 201204 > B36630946 201204 > B63270151 201204 > B63270133 201204 > > > > I have written my code to calculate one more c

[R] [R-pkgs] rPref - new package for preferences and Skylines

2014-08-06 Thread Patrick Roocks
rPref is a new package for Skyline computation and some slight generalizations (database preferences). The Skyline of a dataset selects tuples which are Pareto-optimal with respect to given optimization goals. Only those tuples are returned, which are not dominated by any other tuple. A tuple

Re: [R] Old g++ in Rtools

2014-08-06 Thread Amos B. Elberg
I’m working on a Mac so ymmv, but I’ve been running benchmarks of vanilla R from cran vs. recompiles with different versions of gcc and R, and I see a speedup of 20-30% vs the cran binary after recompiling with gnu 4.9.  Its quite distinct.   Each jump in gcc revision (4.7-4.8, 4.8-4.9) s

[R] [R-pkgs] New version of the symmoments package

2014-08-06 Thread Kem Phillips
R users, Version 1 of the symmoments package computed LaTeX expressions for the central moments of the multivariate normal distribution, and evaluated such moments at specified variance-covariance matrices. In version 1.2, symmoments has been augmented to calculate Latex expressions of non-centra

Re: [R] break loop with keypress

2014-08-06 Thread William Simpson
Thanks Greg. I guess another option is to call a C function directly. On Windows I see there is a function _kbhit() in conio.h. Not sure if it would be that simple. Write a .c file #include int main(void) { int ch; ch= _kbhit(); return ch; } Then do the necessary stuff to call that from R

[R] Breusch-Pagan heterosckedasticity test for mixed models - does it exist ?

2014-08-06 Thread sylvain willart
Hi everyone, I'm asked to perform a heteroskedasticity test for a model, Usually, I use lmtest:bptest and it works fine, But this model I have to test was estimated using nlme:lme, and the bptest function seems to complain about it (no R-Squared I guess?), So I wonder: Does it exist a bptest for

Re: [R] Old g++ in Rtools

2014-08-06 Thread Jeff Newmiller
Re why not more discussion... Well, one reason might be that this is topic belongs on the R-devel mailing list. (Are you really thinking that this is a "free" boost with so many packages that need source edits to compile with the new compilers? There are over 5000 packages on CRAN... are you se

Re: [R] Old g++ in Rtools

2014-08-06 Thread Gabor Grothendieck
On Wed, Aug 6, 2014 at 2:46 AM, Rguy wrote: > I recently downloaded Rtools. I see the g++ version is > gcc version 4.6.3 20111208 (prerelease) (GCC) > > I also recently downloaded MinGW. Its version of g++ is > gcc version 4.8.1 (GCC) > > I believe that later versions of g++ provide better support

Re: [R] Equivalent of read.table for object rather than file

2014-08-06 Thread sbihorel
Hello, For some reason, I did not receive your replies on my email client and had to copy-paste the content of the thread directly from the R archive website. Thank you for pointing out the text connection solution. Regarding the posting guide, I read it 6-7 years ago when I joined the mailing

Re: [R] keep information on the number of warnings

2014-08-06 Thread Luis Borda de Agua
Thank you very much, David, Luís On 04 Aug 2014, at 17:24, Luis Borda de Agua wrote: > Dear David > > Thank you very much for your reply. I’ve only seen it now. > I tried length(warnings) and I got a strange result. > > When I used > > lw <- length(warnings) > print(lw) > > I obtained lw=36

[R] How to perform training and testing using DPpackage of R for Non parametric Bayesian predictive analysis?

2014-08-06 Thread Jason Donnald
Hi all, I want to do some Non-parametric Bayesian predictive anlysis through R and I found out that in R there is DPpackage which has functions for Non-parametric Bayesian modeling. But I am having trouble in understanding how exactly to perform training and testing using the DPpackage as I am una

[R] R Foundation publish citable Manual for packages

2014-08-06 Thread stephen sefick
Hi all: I have had recent issues with citing a package(s) in journals. I have a package that has been cited as the Documentation and accepted into journals, but I just had a problem with the lme4 package. We are citing the submitted paper instead of the documentation. In other words, the citation

[R] citation() command doesn't work in R.3.1.1

2014-08-06 Thread Sverre Stausland
> citation() Error: $ operator is invalid for atomic vectors In addition: Warning message: In packageDescription(pkg = package, lib.loc = dirname(dir)) : no package 'base' was found > sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Nor

Re: [R] Apply quantile function to each dataframe in a List R

2014-08-06 Thread Zilefac Elvis
Great! Thanks. AT. On Monday, August 4, 2014 8:59 PM, rhelpmaillist wrote: Try this: lapply(a,function(x) apply(x[,-c(1,2)],2,quantile,probs=0.95)) # a is your example list At 2014-08-05 09:17:23, "Zilefac Elvis" wrote: >Hello, >I would like to calculate for each numeric column in a datafram

Re: [R] citation() command doesn't work in R.3.1.1

2014-08-06 Thread Igor Sosa Mayor
Sverre Stausland writes: >> citation() > Error: $ operator is invalid for atomic vectors > In addition: Warning message: > In packageDescription(pkg = package, lib.loc = dirname(dir)) : > no package 'base' was found strange... I think something is wrong with the compilation, since as far as I

Re: [R] citation() command doesn't work in R.3.1.1

2014-08-06 Thread Rui Barradas
Works with me. And the OS seems to be the same. > citation() To cite R in publications use: R Core Team (2014). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/. A BibTeX entry for LaTeX users

Re: [R] big data?

2014-08-06 Thread Mike Harwood
The read.table.ffdf function in the ff package can read in delimited files and store them to disk as individual columns. The ffbase package provides additional data management and analytic functionality. I have used these packages on 15 Gb files of 18 million rows and 250 columns. On Tuesday

[R] lattice scales format dates

2014-08-06 Thread Folkes, Michael
Hello all, Based on the help in ?xyplot, and this suggestion from another request: http://stackoverflow.com/questions/20623041/r-formatted-auto-scaling-dat e-axis-using-lattice I was under the impression that this code should give me the desired x axis label date format of: "1911-Jan". da

[R] Amelia: pool data from multiple imputated datasets - for descriptives

2014-08-06 Thread Rawson, Kerri
I used AmeliaView to create 5 imputed datasets. I want to pool the 5 imputed datasets into one to get pooled descriptive information (means, SD, min/max, etc) that is needed to calculate RCI scores (corrected for measurement error and practice effects). The formula to calculate RCI is ((X2 - X

Re: [R] lattice scales format dates

2014-08-06 Thread David Winsemius
On Aug 6, 2014, at 1:11 PM, Folkes, Michael wrote: > Hello all, > > Based on the help in ?xyplot, Which says very little about barchart in particular but rather refers you to ?panel.barchart It's really designed expecting x to be a factor, > and this suggestion from another request: > > h

Re: [R] interactive labeling/highlighting on multiple xy scatter plots

2014-08-06 Thread Shi, Tao
This is new to me.  Thanks for suggesting! Tao On Friday, August 1, 2014 3:05 AM, Michael Lawrence wrote: You should check out the animint package. https://github.com/tdhock/animint On Mon, Jul 28, 2014 at 5:48 PM, Shi, Tao wrote: hi list, > >I'm comparing the changes of ~100 analy

Re: [R] lattice scales format dates

2014-08-06 Thread Folkes, Michael
Thanks David. Much appreciated. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: August-06-14 2:31 PM To: Folkes, Michael Cc: r-help@r-project.org Subject: Re: [R] lattice scales format dates On Aug 6, 2014, at 1:11 PM, Folkes, Michael wrote: > Hello all,

Re: [R] interactive labeling/highlighting on multiple xy scatter plots

2014-08-06 Thread Shi, Tao
Just saw this from the Rstudio webinar too.  Will explore it more.  Thanks! Tao On Thursday, July 31, 2014 11:11 AM, Greg Snow <538...@gmail.com> wrote: The brushing may only be available in the development version of ggvis.  See here for the example: https://github.com/rstudio/webinars/tree

Re: [R] R Foundation publish citable Manual for packages

2014-08-06 Thread Achim Zeileis
On Wed, 6 Aug 2014, stephen sefick wrote: Hi all: I have had recent issues with citing a package(s) in journals. I have a package that has been cited as the Documentation and accepted into journals, but I just had a problem with the lme4 package. We are citing the submitted paper instead of the

[R] sendmailR error: if (code == lcode) { : argument is of length zero

2014-08-06 Thread Seeliger, Curt
Good morning folks, Recently calls to sendmail() in the sendmailR package have occasionally failed with the error "if (code == lcode) { : argument is of length zero". The only thing we are setting in the control argument is the smtp server (control=list(smtpServer='smtp.epa.gov')), so the port

[R] Using axis limits with plot3D

2014-08-06 Thread Waichler, Scott R
I would like to use the functions in the plot3D package but I am having trouble getting the axis limits to work correctly. The slices plotted by the code below go beyond the bounds of the persp box and obscure the axis information. How can I show just the part of the domain within x.limits and

[R] Fractal package - FDWhittle - Estimating the Hurst exponent

2014-08-06 Thread makedon1
Hello list, How would one estimate the Hurst exponent of a time series using the Whittle method in R? It looks like the Fractal package has a function called FDWhittle, but this outputs the "FD Parameter" of a time series and not the Hurst exponent. Any help would be greatly appreciated, as I am

[R] ask for help

2014-08-06 Thread Johnnycz
Hello,everybody, I have a sequence,like a<-c(1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1),how to get the position of each first 1 and 0, that's to say, how to get b<-c(1,6,16,23) for first 1 and d<-c(4,12,18) for first 0. Many thanks! Johnny [[alter

[R] Logical operators and named arguments

2014-08-06 Thread Ryan
Hi, I'm wondering why calling ">" with named arguments doesn't work as expected: > args(">") function (e1, e2) NULL > sapply(c(1,2,3), `>`, e2=0) [1] TRUE TRUE TRUE > sapply(c(1,2,3), `>`, e1=0) [1] TRUE TRUE TRUE Shouldn't the latter be FALSE? Thanks for any help, Ryan The information in

Re: [R] doubleYScale from latticeExtra, problems with style

2014-08-06 Thread Duncan Mackay
Hi Troels Try this (sd1 <- doubleYScale(obj1,obj2,add.ylab2 = TRUE, use.style = FALSE)) update(sd1, par.settings = list(axis.text = list(cex = 1.2), par.ylab.text = list(cex = 1.5))) Amended sd to sd1 Unfortunately doubleYScale uses themes which makes things difficu

Re: [R] Logical operators and named arguments

2014-08-06 Thread Joshua Wiley
Hi Ryan, It does work, but the *apply family of functions always pass to the first argument, so you can specify e2 = , but not e1 =. For example: > sapply(1:3, `>`, e2 = 2) [1] FALSE FALSE TRUE >From ?sapply 'lapply' returns a list of the same length as 'X', each element of which is

Re: [R] doubleYScale from latticeExtra, problems with style

2014-08-06 Thread Troels Ring
Thanks Duncan - getting still better! - but "Y2" is still unformatted and so different from "Y1" - I have been on the help page but fail to find explanations. Best wishes Troels Den 07-08-2014 08:08, Duncan Mackay skrev: (sd1 <- doubleYScale(obj1,obj2,add.ylab2 = TRUE, use.style = FALSE)) upd