[R] singular matrix in composition package

2011-11-22 Thread nur mohd
Dear R user how to solve the error of singular matrix in composition package thanks in advance ros [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] invalid command name tk::MenuDup

2011-11-22 Thread habasque
It seems that tcl/tk doesn't work fine on R-2.11 version. Anyone can run this code to confirm ? [CODE]require(tcltk) tt - tktoplevel() topMenu - tkmenu(tt) tkconfigure(tt,menu=topMenu) fileMenu - tkmenu(topMenu,tearoff=FALSE) tkadd(fileMenu,command,label=Quit,command=function() tkdestroy(tt))

Re: [R] Unexpected result with lag() et diff() in plm package.

2011-11-22 Thread James Ryans
I didn't see you got an answer posted to this question: You can't modify a pdata.frame object. Your transforms turn it back to a normal data frame and diff and lag won't work as expected. Try: Grunfeld.p - pdata.frame(Grunfeld,c(firm,year)) tmp - transform(Grunfeld.p, d.value =

[R] Capping outliers

2011-11-22 Thread Aher
Hi Experts, I am new to R, using following sample code for capping outliers using percentile information. Working on large data (3 observations and 150 variables), loop I am using in the below mentioned code for detecting outliers and capping to upper /lower percentile value is taking much

[R] problem in creating a dataframe

2011-11-22 Thread arunkumar1111
Hi I have a character class and i need to convert into dataframe data=(0,0,0,0) I want a dataframe with each one should under a separate column Please help me -- View this message in context:

[R] Error in gls function in loop structure

2011-11-22 Thread Miles Yang
Hi, r-users I got a problem when I try to call a *gls* function in loop structure. The gls function seems not able to recognize the parameters that I pass into the loop function! (But, if I use lm function, it works.) The code looks like this: =

Re: [R] errors with lme4

2011-11-22 Thread ONKELINX, Thierry
Dear Alessio, A few remarks. - R-sig-mixed models is a better list for this kind of questions - use the glmer() function if you want logistic or poisson regression - the error you are getting is an indication that the model is too complex for the data - watch for colinearity in the covariates

Re: [R] [OT] 1 vs 2-way anova technical question

2011-11-22 Thread Joshua Wiley
On Mon, Nov 21, 2011 at 1:28 PM, Giovanni Azua brave...@gmail.com wrote: On Nov 21, 2011, at 8:31 PM, Bert Gunter wrote: we disagree is that I think data analysts with limited statistical backgrounds should consult with local statisticians instead of trying to muddle through on their own thru

[R] attach 'name' argument ignored with a file?

2011-11-22 Thread Xavier Robin
Dear useRs experRts, I have the feeling that the 'name' argument to the attach function is ignored when 'what' is a file name. Here is an example: save(letters, file=letters.RData) letters.env - attach(letters.RData, name=letters) search() letters.env The name on the search path is

Re: [R] invalid command name tk::MenuDup

2011-11-22 Thread Prof Brian Ripley
On Tue, 22 Nov 2011, habasque wrote: It seems that tcl/tk doesn't work fine on R-2.11 version. As the posting guide says, there is no such version, and this list is only for current versions of R: you were asked to upgrade *before* posting. But it does work correctly in R 2.11.0 on my

Re: [R] Rotation Forest in R

2011-11-22 Thread leomiguelin
http://weka.sourceforge.net/doc.packages/rotationForest/weka/classifiers/meta/RotationForest.html -- View this message in context: http://r.789695.n4.nabble.com/Rotation-Forest-in-R-tp3434951p4095006.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Sensitivity and Specificity Forest Plots

2011-11-22 Thread Viechtbauer Wolfgang (STAT)
Essentially, this is a side-by-side forest plot, where the plot on the left is for sensitivity and the plot on the right is for specificity. For 2x2 table data from diagnostic studies, it is easy to calculate the sensitivity and specificity values (and corresponding sampling variances) by hand.

Re: [R] problem in creating a dataframe

2011-11-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
I believe the command you are looking for is as.data.frame(), though you are probably going to need as.double() rather soon as well. Do note that data frames can, and often do, have character elements. Best, Michael On Nov 22, 2011, at 1:21 AM, arunkumar akpbond...@gmail.com wrote: Hi

Re: [R] Capping outliers

2011-11-22 Thread Jim Holtman
You can easily vectorize this code using pmin/pmax. Sent from my iPad On Nov 22, 2011, at 1:06, Aher ajit.a...@cedar-consulting.com wrote: Hi Experts, I am new to R, using following sample code for capping outliers using percentile information. Working on large data (3 observations

[R] Goodness of fit test in fitdistrplus

2011-11-22 Thread Indrajit Sengupta
I am using the fitdistrplus package in R and would like to do a goodness of fit test. But there does not seem to be any option to do that. Any ideas on how I can do that? Thanks Regards, Indrajit [[alternative HTML version deleted]] __

[R] Problems using log() in a plm() regression.

2011-11-22 Thread Millo Giovanni
Hello Manuel. Yes please, would you send me the data to reproduce the example? Else I cannot tell, although this error is typical of undefined logs (zero or negative argument). Two general observations, for now: - inserting special characters like '*' in variable names is looking for trouble -

Re: [R] problem in creating a dataframe

2011-11-22 Thread Rainer Schuermann
Being new to R myself, I always get trapped by factors. Taking the data you have provided, this worked for my understanding of your intention: x - rep( 0, 4 ) x [1] 0 0 0 0 df - data.frame( matrix( x, 1 ), stringsAsFactors = FALSE ) df X1 X2 X3 X4 1 0 0 0 0 is.character( df[1,1] ) [1]

Re: [R] Capping outliers

2011-11-22 Thread jim holtman
Here is the solution using pmin/pmax for 10,000 rows. min_pctle_cut - 0.01 max_pctle_cut - 0.99 library(outliers) n - 1 x1 - runif(n) x2 - runif(n) x3 - x1 + x2 + runif(n)/10 x4 - x1 + x2 + x3 + runif(n)/10 x5 - factor(sample(c('a','b','c'),n,replace=TRUE)) x6 - factor(1*(x5=='a' |

Re: [R] [OT] 1 vs 2-way anova technical question

2011-11-22 Thread Giovanni Azua
On Nov 22, 2011, at 10:35 AM, Joshua Wiley wrote: It is true the way you use general lists is not our business, but the R-help list is a community and there are community rules. One of I meant that my use of the lists is not of __his__ business I wasn't referring to you nor other people in

[R] Similar function for Redun() from Hmisc ?

2011-11-22 Thread aajit75
Hi List, Working on the large data frame (number of records=35000 and number of variables=160). Using redun() for dropping variables before using into model. V - redun(~., data = data.frame, r2 = 0.8) It takes enormously high time for execution, is there anything wrong in the script? Suggest

Re: [R] Similar function for Redun() from Hmisc ?

2011-11-22 Thread Frank Harrell
Specifying nk=0 to force all effects to be linear will speed things up. Frank aajit75 wrote Hi List, Working on the large data frame (number of records=35000 and number of variables=160). Using redun() for dropping variables before using into model. V - redun(~., data = data.frame, r2

[R] Error with step and glmmML

2011-11-22 Thread Alba
Hi everybody, I'm trying to select a model with the function step. It is a mixed generalized linear model fitted by the function glmmML. I have one random variable (id), one response variable (var) and many independent variables (x1, x2, x3..). I obtain the following error: Error in if

[R] logarithmically scaled y-axis in vioplot

2011-11-22 Thread french-connection
Dear all I am trying to make a graphic with the vioplot package. I use the following code: library(vioplot) x1 - GSMrxDL x2 - WIFI x3 - UMT vioplot(x1, x2, x3, ylim=c(0, 10), names=c(GSMrxDL, WIFI, UMT), col=gold) title(NIS Strahlung, xlab=Sender, ylab=V/m) Now I want to scale the y-axis

Re: [R] Scatter plot - using colour to group points?

2011-11-22 Thread SarahH
Thanks all for suggestions. I now have a nice plot showing the temperature of 6 different sites, each site distinguished by different coloured points, using nested ifelse. My apologies I thought I could change the type to l and the same arguments would be applied to line graph, with 6 different

[R] snow package, socketConnection error, SSH, in Windows 7 x64

2011-11-22 Thread Артем Харитонов
Hi. I have some problems trying to make cluster via snow package and haven't found a solution for my problem in archives and relative topics. I installed ssh server using cygwin and set a password-less SSH Login. In R session after starting ssh service: system(ssh 10.10.5.15 date) Tue Nov

[R] SE for parameters estimated by optim() - problem with constraints

2011-11-22 Thread Tomasz Berezowski
Dear all, I have a problem with calculation of SE of parameters with a fisher matrix. the fisher matrix is calculated from the hessian matrix which is an output from optim(). However, can I calculate it this way if the optimisation criterion was to minimise RMSE? Maybe it works only with a

Re: [R] readDGE: Error in colnames/length of dimnames not equal to array extent

2011-11-22 Thread Martin Morgan
On 11/21/2011 12:43 PM, jazevedo wrote: Hello, all, I'm a new R user (new to any programming language in general, really), so I apologize if this is easy/has already been answered (I've attempted searching online but did not understand the pages I found). My data is stored in text files with

Re: [R] logarithmically scaled y-axis in vioplot

2011-11-22 Thread Uwe Ligges
On 22.11.2011 12:37, french-connect...@gmx.net wrote: Dear all I am trying to make a graphic with the vioplot package. I use the following code: library(vioplot) x1- GSMrxDL x2- WIFI x3- UMT vioplot(x1, x2, x3, ylim=c(0, 10), names=c(GSMrxDL, WIFI, UMT), col=gold) title(NIS Strahlung,

Re: [R] logarithmically scaled y-axis in vioplot

2011-11-22 Thread Uwe Ligges
On 22.11.2011 12:37, french-connect...@gmx.net wrote: Dear all I am trying to make a graphic with the vioplot package. I use the following code: library(vioplot) x1- GSMrxDL x2- WIFI x3- UMT vioplot(x1, x2, x3, ylim=c(0, 10), names=c(GSMrxDL, WIFI, UMT), col=gold) title(NIS Strahlung,

Re: [R] singular matrix in composition package

2011-11-22 Thread Uwe Ligges
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code! On 22.11.2011 05:13, nur mohd wrote: Dear R user There are thousands on this list, none of them able to help you. how to solve the error of

Re: [R] Read from HTML file, print if see a specific string

2011-11-22 Thread Uwe Ligges
On 21.11.2011 21:51, yesitsjess wrote: So basically I have made a HTML file with a table in it. Column 3 contains a GenBank number and is always proceeded by =GenBank. I want to read the file and return the number which comes directly after this (the contents of column 3). Ideally I would

Re: [R] [OT] 1 vs 2-way anova technical question

2011-11-22 Thread Liviu Andronic
On Tue, Nov 22, 2011 at 2:09 PM, Giovanni Azua brave...@gmail.com wrote: Mr. Gunter did not read/understand my problem, and there were no useful tips but only ad hominem attacks. By your side-taking I suspect you are in the same party club if you want to defend him maybe you should start by

[R] Cp -Inf

2011-11-22 Thread Stephen Sefick
Hello All: I am using the leaps package on scale and centered data for an exhaustive search. There are Cp values of -Inf being returned for all models. I was going to look at the source before contacting the list, but it has been a while since I have looked under the hood. There are .rdb

Re: [R] [OT] 1 vs 2-way anova technical question

2011-11-22 Thread Giovanni Azua
On Nov 22, 2011, at 3:52 PM, Liviu Andronic wrote: On Tue, Nov 22, 2011 at 2:09 PM, Giovanni Azua brave...@gmail.com wrote: Mr. Gunter did not read/understand my problem, and there were no useful tips but only ad hominem attacks. By your side-taking I suspect you are in the same party club

Re: [R] Drawing ticks in the 3rd and 4th row of a lattice

2011-11-22 Thread Deepayan Sarkar
On Fri, Nov 18, 2011 at 11:22 AM, Ashim Kapoor ashimkap...@gmail.com wrote: Dear all, I want to draw ticks on the 3rd and 4th row of a lattice. How do I do this ? In my search of the help, I discovered a parameter alternating,which kind of says where the ticks will be but does not suffice for

[R] (no subject)

2011-11-22 Thread Funwi-Gabga Neba
http://jennys.cz/modules/mod_wdbanners/yes.php?html143 __ R-help@r-project.org mailing list 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,

Re: [R] Scatter plot - using colour to group points?

2011-11-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
There's also the lines() command which takes a col argument if you want to do multiple lines (I usually wind up wrapping it in a for loop though there might be something smarter) ggplot2 is great, though the learning curve is a little rough: you can get good help here but if you go down that

[R] help to setting a multiple (linear) regression model with a 5% significance level (threshold) for the inclusion of the model variables.

2011-11-22 Thread gianni lavaredo
Dear Researchers, someone know the right syntax to chose a 5% significance level (threshold) for the inclusion of the model variables in a multiple (linear) regression in backward way? I set the formula in this way, but I don't know to choose the 5% significance? lmodelV -

Re: [R] help to setting a multiple (linear) regression model with a 5% significance level (threshold) for the inclusion of the model variables.

2011-11-22 Thread Prof Brian Ripley
On 22/11/2011 16:30, gianni lavaredo wrote: Dear Researchers, someone know the right syntax to chose a 5% significance level (threshold) for the inclusion of the model variables in a multiple (linear) regression in backward way? I set the formula in this way, but I don't know to choose the

[R] Varma models in the dse package

2011-11-22 Thread Tanja Krone
Hi, I tried to run the VARMA model in the dse package. I specified a model: arma A(L) = 1+0.244L10+0.05L1 0-0.325L11-0.234L1 B(L) = 1-0.277L10+0.211L1 0-0.206L11+0.238L1 and have a TSdata object: dfdata output data: Series 1 Series 2 1 difex2 difem2 but I get this warning

[R] Removing rows in dataframe w'o duplicated values

2011-11-22 Thread AC Del Re
Hi, Is there an easy way to remove dataframe rows without duplicated values of a specified column ('id')? e.g., dat - data.frame(id = c(1,1,1,2,3,3), value = c(5,6,7,4,5,4), value2 = c(1,4,3,3,4,3)) dat id value value2 1 1 5 1 2 1 6 4 3 1 7 3 4 2 4 3 5

[R] Compile R package under Windows

2011-11-22 Thread Nicola Sturaro Sommacal
Hi. I need to compile an R package under Windows, to get a zip file. I can't used the web services, because it is avalaible only for the current version of R while I need of a package compiled with R 2.13.1. The package contain C code that requires the GSL C library. In your experience, what

Re: [R] Removing rows in dataframe w'o duplicated values

2011-11-22 Thread B77S
This is ugly, but it gets what you want. dat[which(dat[,1] %in% unique((dat[duplicated(dat[,1], fromLast = T), 1]))),] AC Del Re wrote Hi, Is there an easy way to remove dataframe rows without duplicated values of a specified column ('id')? e.g., dat - data.frame(id =

Re: [R] Compile R package under Windows

2011-11-22 Thread Uwe Ligges
On 22.11.2011 18:57, Nicola Sturaro Sommacal wrote: Hi. I need to compile an R package under Windows, to get a zip file. I can't used the web services, because it is avalaible only for the current version of R while I need of a package compiled with R 2.13.1. The package contain C code that

[R] evaluation question

2011-11-22 Thread Erin Hodgess
Dear R People: Hope you're having a nice day. Here is a character vector: yz [1] pexp(3.2,rate=1) str(yz) chr pexp(3.2,rate=1) And I would like to evaluate that vector. I tried: eval(as.expression(yz)) [1] pexp(3.2,rate=1) But that doesn't work. Any suggestions would be most welcome.

Re: [R] evaluation question

2011-11-22 Thread R. Michael Weylandt
Good morning Erin, eval(parse(text = pexp(3.2,rate=1))) seems to work But the general rule applies: library(fortunes) fortune(parse()) Best, Michael On Tue, Nov 22, 2011 at 1:23 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: Hope you're having a nice day. Here is a

Re: [R] arima.sim: innov querry

2011-11-22 Thread Andy Bunn
On 22/11/11 13:04, Andy Bunn wrote: Apologies for thickness - I'm sure that this operates as documented and with good reason. However... My understanding of arima.sim() is obviously imperfect. In the example below I assume that x1 and x2 are similar white noise processes with a mean of 5

Re: [R] evaluation question

2011-11-22 Thread Uwe Ligges
On 22.11.2011 19:23, Erin Hodgess wrote: Dear R People: Hope you're having a nice day. Here is a character vector: yz [1] pexp(3.2,rate=1) str(yz) chr pexp(3.2,rate=1) And I would like to evaluate that vector. I tried: eval(as.expression(yz)) [1] pexp(3.2,rate=1) But that

Re: [R] Removing rows in dataframe w'o duplicated values

2011-11-22 Thread Dennis Murphy
Hi: Here's one way: do.call(rbind, lapply(L, function(d) if(nrow(d) 1) return(d))) id value value2 1.1 1 5 1 1.2 1 6 4 1.3 1 7 3 3.5 3 5 4 3.6 3 4 3 HTH, Dennis On Tue, Nov 22, 2011 at 9:43 AM, AC Del Re de...@wisc.edu wrote: Hi, Is

Re: [R] Removing rows in dataframe w'o duplicated values

2011-11-22 Thread Dennis Murphy
Sorry, you need this first: L - split(dat, dat$id) do.call(rbind, lapply(L, function(d) if(nrow(d) 1) return(d))) D. On Tue, Nov 22, 2011 at 10:38 AM, Dennis Murphy djmu...@gmail.com wrote: Hi: Here's one way: do.call(rbind, lapply(L, function(d) if(nrow(d) 1) return(d)))    id value

Re: [R] Removing rows in dataframe w'o duplicated values

2011-11-22 Thread Dimitris Rizopoulos
one approach is the following: dat - data.frame(id = c(1,1,1,2,3,3), value = c(5,6,7,4,5,4), value2 = c(1,4,3,3,4,3)) ind - ave(dat$id, dat$id, FUN = length) 1 dat[ind, ] I hope it helps. Best, Dimitris On 11/22/2011 6:43 PM, AC Del Re wrote: Hi, Is there an easy way to remove

Re: [R] Removing rows in dataframe w'o duplicated values

2011-11-22 Thread David Winsemius
On Nov 22, 2011, at 12:43 PM, AC Del Re wrote: Hi, Is there an easy way to remove dataframe rows without duplicated values of a specified column ('id')? e.g., dat - data.frame(id = c(1,1,1,2,3,3), value = c(5,6,7,4,5,4), value2 = c(1,4,3,3,4,3)) dat id value value2 1 1 5 1

Re: [R] Cp -Inf

2011-11-22 Thread Thomas Lumley
On Wed, Nov 23, 2011 at 3:55 AM, Stephen Sefick sas0...@auburn.edu wrote: Hello All: I am using the leaps package on scale and centered data for an exhaustive search.  There are Cp values of -Inf being returned for all models.  I was going to look at the source before contacting the list, but

[R] Looking for a C function

2011-11-22 Thread Ron Michael
Dear all, I was looking for the C program found within approxfun() function. I already have a list of available C programs which are being used with R here, https://svn.r-project.org/R/trunk/src/main/. However this list does not contain above C function. Can somebody help me on where to find

[R] plotting output from LME with natural cubic spline

2011-11-22 Thread Rodday, Angie Mae
I have used LME to fit a mixed effects model on my data. The data has 274 subjects with 1 to 6 observations per subject. Time is not linearly associated with the outcome, so I used ns to fit a natural cubic spline with 3 auto knots. Subject and the natural cubic time of spline are both treated as

[R] Header = T

2011-11-22 Thread lucky7
Hi, I just start to use R today! I am reading the R Help on read.csv and the description for header says header is set to TRUE if and only if the first row contains one fewer field than the number of columns. Why is that? My data has the same number of fields in the first row as the number of

[R] Data Frame Search Slow

2011-11-22 Thread TimothyDalbey
Hey All, So - I promise to write a blog post on this topic and post it somewhere on the internet once I get to the bottom of this. Basically, the set-up to the problem is like this: 1. I have a data frame with dim (2547290, 4) 2. I need to make SQL like lookups on the dataframe. I have been

[R] Lattice graph strips and axes

2011-11-22 Thread Andrew McFadden
Hi all I was wondering if it is possible to get rid of the horizontal strips and produce each barchart with a left y axes and lower x axes only. Also can you specify an exact size of graph ie 88mm wide with a font size of 'x'. library(lattice) library(latticeExtra) n=as.factor(c(1:5,1:5))

[R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
Dear All, in some functions of my package, I use the Matrix S4 class, as defined in the Matrix package. I don't want to depend on Matrix, however, because my package is perfectly fine without Matrix, most of the functionality does not need Matrix. Matrix is so included in the 'Suggests' line. I

Re: [R] On-demand importing of a package

2011-11-22 Thread R. Michael Weylandt
How about calling Matrix's namespace directly? Matrix:::rowSums() Michael On Tue, Nov 22, 2011 at 3:16 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: Dear All, in some functions of my package, I use the Matrix S4 class, as defined in the Matrix package. I don't want to depend on Matrix,

Re: [R] On-demand importing of a package

2011-11-22 Thread Joshua Wiley
Hi Gábor, You could import rowSums. This will not fully attach Matrix. I am not sure there is a really good solution for what you want to do. To fully use and validate your package, Matrix appears to be required. This is different from simply, for example, enhancing the Matrix package. You

Re: [R] Data Frame Search Slow

2011-11-22 Thread jim holtman
take a look at using the 'data.table' package. Here are some times to do the lookup using dataframes, matrices and data.tables: data.tables give the answer is less than 0.1 seconds. str(x.df) 'data.frame': 250 obs. of 4 variables: $ x : Factor w/ 455063 levels ,AAAB,..: 200683

Re: [R] Adding two or more columns of a data frame for each row when NAs are present.

2011-11-22 Thread Ian Strang
I think, here is the solution. If NA is included in read.table list the row becomes a factor: $ Q21: Factor w/ 3 levels 1, 2, NA: 1 2 3 2 2. This will not work with rowSums. If I put the missing value as a blank, then it is still read as NA but the whole row is considered as an integer and OK

[R] x, y for point of intersection

2011-11-22 Thread Monica Pisica
Hi everyone,   I am trying to get a point of intersection between a polyline and a straight line ….. and get the x and y coordinates of this point. For exemplification consider this:     set.seed(123)   k1 -rnorm(100, mean=1.77, sd=3.33)  k1 - sort(k1) q1 - rnorm(100, mean=2.37,

[R] Bezier curve in R?

2011-11-22 Thread Tengfei Yin
Hi dear all, I am wondering if there is a function existing in R that did the quadratic bezier curve interpolation? I hope to generate a bezier curve based on three sets of points: two end of the line and a control point. Thanks in advance. Tengfei -- Tengfei Yin MCDB PhD student 1620 Howe

Re: [R] x, y for point of intersection

2011-11-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
If it's a one off, the identify() function might be of help -- if you need something algorithmic it's harder due to floating point stuff and sampling frequencies. Let me know if that's the case. Michael On Nov 22, 2011, at 3:40 PM, Monica Pisica pisican...@hotmail.com wrote: Hi

Re: [R] Bezier curve in R?

2011-11-22 Thread Frank Harrell
require(Hmisc) ?bezier ?drawPlot Frank Tengfei Yin wrote Hi dear all, I am wondering if there is a function existing in R that did the quadratic bezier curve interpolation? I hope to generate a bezier curve based on three sets of points: two end of the line and a control point. Thanks

[R] Missing data?

2011-11-22 Thread Kevin Burton
I was wondering what the best approach is for missing data in a time series. I give an example using xts but I would like to know what seems to be the best method. Say I have library(xts) xts.ts - xts(1:4,as.Date(c(1970-01-01, 1970-1-3, 1980-10-10, 2007-8-19)), frequency=52) I would like

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
Thanks, I have tried that, it does not work, because rowSums() calls callGeneric(): Matrix:::rowSums(W) Error in callGeneric() : 'callGeneric' must be called from a generic function or method G. On Tue, Nov 22, 2011 at 3:20 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: How about

Re: [R] Missing data?

2011-11-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
Couldn't you use seq.Date() to set up the time index and then just fill as appropriate? Alternatively, to.weekly if you are starting with a daily series. Michael On Nov 22, 2011, at 4:00 PM, Kevin Burton rkevinbur...@charter.net wrote: I was wondering what the best approach is for missing

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
Hi Josh, On Tue, Nov 22, 2011 at 3:31 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi Gábor, You could import rowSums.  This will not fully attach Matrix.  I am not sure there is a really good solution for what you want to do.  To fully use and validate your package, Matrix appears to be

Re: [R] Bezier curve in R?

2011-11-22 Thread Tengfei Yin
Hi Prof. Frank Harrell, The bezier function in Hmisc package is exactly what I am looking for. Thanks a lot! Tengfei On Tue, Nov 22, 2011 at 2:55 PM, Frank Harrell f.harr...@vanderbilt.eduwrote: require(Hmisc) ?bezier ?drawPlot Frank Tengfei Yin wrote Hi dear all, I am

Re: [R] On-demand importing of a package

2011-11-22 Thread Martin Morgan
On 11/22/2011 01:16 PM, Gábor Csárdi wrote: Hi Josh, On Tue, Nov 22, 2011 at 3:31 PM, Joshua Wileyjwiley.ps...@gmail.com wrote: Hi Gábor, You could import rowSums. This will not fully attach Matrix. I am not sure there is a really good solution for what you want to do. To fully use and

Re: [R] x, y for point of intersection

2011-11-22 Thread Monica Pisica
Hi, No it is not one off, the situation is even more complicated i will have a series of straight lines like the red one parallel with each other that intersect the black polyline and i need to get all the points (x, y). Meanwhile i was thinking if it will not be easier if somehow i can

Re: [R] On-demand importing of a package

2011-11-22 Thread William Dunlap
I also wondered why it is important to not mention Matrix in the DEPSCRIPTION file's Depends or Imports lines, even though some functions in the package require it. If this is a hard requirement you could split your package into two packages, pkgBasic and pkgEnhanced. pkgBasic would not not

[R] Graphics in vector format

2011-11-22 Thread Antonio Rodriges
Hello, Is there a way to save plots in vector format like SVG or smth else? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Header = T

2011-11-22 Thread Richard M. Heiberger
a b A 1 2 B 3 4 C 5 6 The assumption above is that the rownames don't have a header and the columns do. Therefore the default is header=TRUE. r a b A 1 2 B 3 4 C 5 6 In the second example, the first column is called r and it is not clear whether that is a column with a variable

[R] making scatterplot easier to read

2011-11-22 Thread Szymek Drobniak
Dear R users, do you know an easy way (other than star plot) of making several points laying one over another visible? Is it any simple way of increasing such multipoint symbols - or shifting their positions randomly to make several points in one place visible? Cheers, sz. -- Szymon Drobniak

Re: [R] Graphics in vector format

2011-11-22 Thread R. Michael Weylandt michael.weyla...@gmail.com
I believe the Cairo package provides SVG faculties. Michael On Nov 22, 2011, at 4:48 PM, Antonio Rodriges antonio@gmail.com wrote: Hello, Is there a way to save plots in vector format like SVG or smth else? __ R-help@r-project.org mailing

Re: [R] x, y for point of intersection

2011-11-22 Thread David Winsemius
On Nov 22, 2011, at 3:40 PM, Monica Pisica wrote: (edited out excessive white space) I am trying to get a point of intersection between a polyline and a straight line ….. and get the x and y coordinates of this point. For exemplification consider this: set.seed(123) k1 -rnorm(100,

Re: [R] making scatterplot easier to read

2011-11-22 Thread David Winsemius
On Nov 22, 2011, at 4:58 PM, Szymek Drobniak wrote: Dear R users, do you know an easy way (other than star plot) of making several points laying one over another visible? Is it any simple way of increasing such multipoint symbols - or shifting their positions randomly to make several

Re: [R] Missing data?

2011-11-22 Thread Kevin Burton
Thank you for the suggestions. The only problems I see with 'to.weekly' is converting from the OHLC format and realizing that the date is the last day of the week rather than the first day of the week. Very minor compared to doing the whole thing myself. -Original Message- From: R.

Re: [R] Fwd: xtable and sweave: caption placement problem

2011-11-22 Thread Brian Diggs
On 11/18/2011 1:22 AM, ren...@vannieuwkoop.ch wrote: \documentclass[11pt,a4paper]{article} \usepackage{Sweave} \begin{document} = x = runif(100, 1, 10) y = 2 + 3 * x + rnorm(100) @ echo=FALSE,results=tex= library(xtable) print(xtable(summary(lm(y~x)), align=r, caption=Summary

Re: [R] Missing data?

2011-11-22 Thread Kevin Burton
Also with to.weekly there seems to be a problem with when the week starts. For example: xts.ts - xts(1:4, c(as.Date(2011-01-01), as.Date(2011-01-10), as.Date(2011-10-09), as.Date(2011-10-10)), frequency=52) to.weekly(xts.ts) xts.ts.Open xts.ts.High xts.ts.Low xts.ts.Close 2011-01-01

Re: [R] x, y for point of intersection

2011-11-22 Thread Ted Harding
On 22-Nov-11 21:25:56, Monica Pisica wrote: Hi everyone, I am trying to get a point of intersection between a polyline and a straight line ….. and get the x and y coordinates of this point. For exemplification consider this: set.seed(123) k1 -rnorm(100, mean=1.77, sd=3.33) k1 -

[R] filtering probesets with Bioconductor?

2011-11-22 Thread baumeist
Hi, I am relatively new to R and Bioconductor and am trying to filter the topTable that I generated of differentially expressed genes from my normlized eset file comprised of ~ 40 HG-133A Affy microarrays . I would like to see if particular probesets are represented in this list. Alternatively

Re: [R] Data Frame Search Slow

2011-11-22 Thread TimothyDalbey
Wow, these specs are fantastic: user system elapsed 0.330.000.39 I wonder how much of that is because of the capacity of the box that you are running R on. Can you post pertinent specs? This suggest to me that hardware upgrades (RAM specifically) may also be in order.

[R] Help to inputting a pre-defined correlation structure in a Mixed Model

2011-11-22 Thread albertwschulthess
I'm working in a Gen/Marker-Phenotype association study in wheat and I'm using a Mixed Model Approach to estimate the effect of the markers. My model has the atribute measured as y (response variable), the markers and the blocks (of a complete random block design) as fixed and the genotypes and

Re: [R] Data Frame Search Slow

2011-11-22 Thread TimothyDalbey
So, here is the result time from using the datatable package: user system elapsed 0.800 0.012 1.847 Here are the methods that I am using: ush - data.table(read.csv(...)) setkey(ush, product_id) s1 - subset(ush, product_id == product.id) Seems like a minor improvement but not

[R] Rcmdr numSummary: means of multiple variables without grouping

2011-11-22 Thread Boris Mayer
Hello there, when using the function numSummary in Rcmdr and selecting more than one variable (without grouping), the grand mean across all variables is returned for each variable instead of the mean of each single variable. However, this happens only for the mean, and not for sd, quantiles

Re: [R] On-demand importing of a package

2011-11-22 Thread Gábor Csárdi
On Tue, Nov 22, 2011 at 4:27 PM, Martin Morgan mtmor...@fhcrc.org wrote: [...] No need to Depend:. Use Imports: Matrix plus in the NAMESPACE file  importFrom(Matrix, rowSums) Why do you not want to do this? Matrix is available for everyone, Imports: doesn't influence the package search

Re: [R] Data Frame Search Slow

2011-11-22 Thread TimothyDalbey
Update from email outside of this thread: Justin Haynes writes: matrices will help, but two quick solutions: if you are looking for single items to go in the some_value space, use == instead of %in% and you'll notice speedups. The second more involved option is to take a look at the

Re: [R] Data Frame Search Slow

2011-11-22 Thread TimothyDalbey
Answer to my own question: ush - data.table(read.csv(...)) setkey(ush, product_id) s1 - ush[J[product.id]] user system elapsed 0.000 0.000 0.003 It seems like that's the method to use! Amazing. -- View this message in context:

Re: [R] Scatter plot - using colour to group points?

2011-11-22 Thread SarahH
Success with the lines command and col argument! I have some nice point and line plots. Thanks so much for you help. Ongoing project - I will probably be back! Sarah -- View this message in context: http://r.789695.n4.nabble.com/Scatter-plot-using-colour-to-group-points-tp4092794p4097625.html

Re: [R] Rcmdr numSummary: means of multiple variables without grouping

2011-11-22 Thread John Fox
Dear Boris, This bug is traceable to a change in the mean() function in R and is fixed in the current version (1.7-3) of the Rcmdr package on CRAN. Best, John John Fox Sen. William McMaster Prof. of Social Statistics Department of Sociology

Re: [R] evaluation question

2011-11-22 Thread Rolf Turner
On 23/11/11 07:31, R. Michael Weylandt wrote: Good morning Erin, eval(parse(text = pexp(3.2,rate=1))) seems to work But the general rule applies: library(fortunes) fortune(parse()) The fortune notwithstanding I find this *specific* use of parse() to be very, uh, useful! :-) cheers,

[R] glht for lme object with significant interaction term

2011-11-22 Thread anord
Dear all, I'm working on some data from an experiment on the breeding behavior of birds. In short, I have been measuring how the time spent on performing a certain task (variable 'mean_on_active') differs over time (variable 'day', 2 levels) across three experimental categories (variable

Re: [R] On-demand importing of a package

2011-11-22 Thread Jeff Newmiller
If Suggests doesn't work for you, perhaps you need to put more effort into reinventing the wheel, and depend less on other packages. --- Jeff NewmillerThe . . Go Live...

Re: [R] Missing data?

2011-11-22 Thread Kevin Burton
Void of any other suggestions this approach makes sense but for my case I think I need to use zoo objects rather than xts. If I sequence the data generally I don't know if there will be 365 days in the year or 366. So I have to sequence the dates as: seq(from=as.Date(2011-01-01),

Re: [R] On-demand importing of a package

2011-11-22 Thread Martin Morgan
On 11/22/2011 03:06 PM, Gábor Csárdi wrote: On Tue, Nov 22, 2011 at 4:27 PM, Martin Morganmtmor...@fhcrc.org wrote: [...] No need to Depend:. Use Imports: Matrix plus in the NAMESPACE file importFrom(Matrix, rowSums) Why do you not want to do this? Matrix is available for everyone,

  1   2   >