Re: [R] ANOVA 1 too few degrees of freedom

2011-05-05 Thread S Ellison
Rovinpiper david.j.mee...@gmail.com 04/05/2011 22:43 So this seems to indicate that I have what I want. I have two respiration data points at each plot on each day. Yes; if you had only Plot+Day you'd have a completely balanced full factorial ... for Plot and Day. But I think I now see an

Re: [R] ANOVA

2011-05-05 Thread David Winsemius
On May 5, 2011, at 2:31 PM, Asan Ramzan wrote: Hello R-Help How can i exctact and store the within group mean squared difference from an anova summary table into a varible. In the absence of an example and code it's speculation, but something along the lines of: anova(fit)$`Mean Sq`

Re: [R] Using $ accessor in GAM formula

2011-05-05 Thread P Ehlers
Gene, David has given you the preferred code. I just want to point out that the $-accessor is often not the best thing to use. Both dat[[y]] and dat[, y] will work just fine. Peter Ehlers On 2011-05-05 12:06, David Winsemius wrote: On May 5, 2011, at 1:08 PM, Gene Leynes wrote: This is not

Re: [R] help with a survplot

2011-05-05 Thread Marco Barbàra
Il giorno Mon, 2 May 2011 07:30:10 -0700 (PDT) Frank Harrell f.harr...@vanderbilt.edu ha scritto: Please elaborate. It is simply that, generally speaking, i don't like adding numbers to a plot. I eventually realized that riskset cardinality may be a useful indication. However, do not

Re: [R] Instrumental variable quantile estimation of spatial autoregressive models

2011-05-05 Thread Roger Bivand
This is a very detailed question, and possibly ought to have been posted on R-sig-geo. Please re-post there, and see if anyone steps forward. As far as I am aware, no implementation exists. I suggest you also refer to Kostov (2009) in Spatial Economic Analysis volume 4. Roger Marie-Line

Re: [R] R CMD check warning

2011-05-05 Thread Ray Brownrigg
On 6/05/2011 6:06 a.m., swaraj basu wrote: Dear All, I am trying to build a package for a set of functions. I am able to build the package and its working fine. When I check it with R CMD check I get a following warning : no visible global function

Re: [R] R CMD check warning

2011-05-05 Thread Martin Morgan
On 05/05/2011 11:06 AM, swaraj basu wrote: Dear All, I am trying to build a package for a set of functions. I am able to build the package and its working fine. When I check it with R CMD check I get a following warning : no visible global function

[R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-05 Thread Schatzi
I have a new device that takes measurements anywhere from every second, to every 15 minutes (depending on changes). The matrix has a date, time and Y column (Y is the measurement). For three days it is 25,000 rows. How do I average the measurements by every 30 minutes so my matrix is 48 rows per

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-05 Thread Clint Bowman
I'd be tempted to do a robust fit (loess?) to the data with a relatively small span (I'm assuming that there are errors in the measurements and some degree of smoothing is acceptable) then predict the fit at a regular interval (e.g., every 30 minutes). -- Clint Bowman

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-05 Thread Schatzi
I do not want smoothing as the data should have jumps (it is weight left in feeding bunker). I was thinking of maybe using a histogram-like function and then averaging that. Not sure if this is possible. - In theory, practice and theory are the same. In practice, they are not - Albert

[R] problem with cor() using bigmemory

2011-05-05 Thread Estefania Ruiz Vargas
Hello, I have a rather large set of data I need to analyze, currently I need to work with a 20 by 20 matrix, I'm using the package bigmemory but so far I can only allocate a 66000 by 66000 matrix, when I increase those values I get the following error:   AdjMat -

[R] Looking for equivalent for strstr

2011-05-05 Thread Worik R
Friends This is an elementary question. Is there is a built in R function for finding a sub-string in another string? Like strstr in C. I can easily roll my own, but if there is a built in that is one less thing I can do wrong! cheers Worik [[alternative HTML version deleted]]

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-05 Thread Clint Bowman
In your first request for help you said, How do I average the measurements by every 30 minutes? With 25000 readings over three days, it looks as if you are getting readings just about every second. Okay, why don't you use the first reading as your initial weight, w0. Then subtract each

Re: [R] Averaging uneven measurements by time with uneven numbers of measurements

2011-05-05 Thread P Ehlers
On 2011-05-05 14:20, Schatzi wrote: I do not want smoothing as the data should have jumps (it is weight left in feeding bunker). I was thinking of maybe using a histogram-like function and then averaging that. Not sure if this is possible. (It would be useful to include your original request -

Re: [R] Looking for equivalent for strstr

2011-05-05 Thread David Winsemius
On May 5, 2011, at 4:55 PM, Worik R wrote: Friends This is an elementary question. Is there is a built in R function for finding a sub-string in another string? Like strstr in C. I can easily roll my own, but if there is a built in that is one less thing I can do wrong! I have no

[R] Looping over graphs in igraph

2011-05-05 Thread Danielle Li
Hi, I'm trying to do some basic social network analysis with igraph in R, but I'm new to R and haven't been able to find documentation on a couple basic things: I want to run igraph's community detection algorithms on a couple thousand small graphs but don't know how to automate igraph looking

[R] quick question : interpolating file name in pipe command

2011-05-05 Thread Abhishek Pratap
Hi Guys I am trying to read a bunch of files in the loop but pipe function which I use to cut few columns is somehow unable to interpolate the file variable. eg: file=check.txt data - read.table(pipe(cut -f 2,3 file), sep=\t, col.names=c('pos','cov') ) cut: file: No such file or directory

Re: [R] Insert values to histogram

2011-05-05 Thread Steven Kennedy
Histograms plot data in bins - you don't get the exact value, because each bin contains a range of values. Do you want to plot the range of values the bin contains? Also, check ?hist to see how to set the values of the breaks between the bins. __

Re: [R] ANOVA 1 too few degrees of freedom

2011-05-05 Thread Rovinpiper
Thanks slre, I seem to be making some progress now. Using a colon instead of an asterisk in the code really changes things. I had been getting residual SS and MS of zero. Which is ridiculous. Now I get much more plausible values. Also, When I used an asterisk instead of a colon It wouldn't

[R] reading a column as a character vector

2011-05-05 Thread Gamliel Beyderman
Hi! I have 2 columns (even though the data looks like there's more columns than just two) of data in the following format: 0,58905313R0EOL 229742002R0EOL 58905312R0EOL 1,58905317R0DBL 58905303R0DBL 58905313R0IL 58905313R0VH 58905313R0EOL 223354003R0IL 223354003R0VH 58905308R0DBL 58905308R0VM

Re: [R] quick question : interpolating file name in pipe command

2011-05-05 Thread Abhishek Pratap
You can ignore my question I was able to figure out the way. I guess when I touch R after couple of weeks I am rusty. -Abhi On Thu, May 5, 2011 at 2:15 PM, Abhishek Pratap abhishek@gmail.com wrote: Hi Guys I am trying to read a bunch of files in the loop but pipe function which I use

Re: [R] quick question : interpolating file name in pipe command

2011-05-05 Thread David Winsemius
On May 5, 2011, at 5:15 PM, Abhishek Pratap wrote: Hi Guys I am trying to read a bunch of files in the loop but pipe function which I use to cut few columns is somehow unable to interpolate the file variable. eg: file=check.txt data - read.table(pipe(cut -f 2,3 file), sep=\t,

Re: [R] Looking for equivalent for strstr

2011-05-05 Thread Gabor Grothendieck
On Thu, May 5, 2011 at 4:55 PM, Worik R wor...@gmail.com wrote: Friends This is an elementary question.  Is there is a built in R function for finding a sub-string in another string?  Like strstr in C. I can easily roll my own, but if there is a built in that is one less thing I can do

Re: [R] Using $ accessor in GAM formula

2011-05-05 Thread Rolf Turner
On 06/05/11 07:05, P Ehlers wrote: Gene, David has given you the preferred code. I just want to point out that the $-accessor is often not the best thing to use. Both dat[[y]] and dat[, y] will work just fine. Admittedly one should use the preferred code, i.e. gam(y ~ s(x),data=dat) and avoid

[R] factors

2011-05-05 Thread J
Hi, I'm requesting you don't berate me for asking this question: I clearly don't have the gist of factors. I have two dataframes, A and B. Each of them has a column containing strings (they're labels). I want to, one-by-one in a loop, compare the particular string in an entry from dataframe A

Re: [R] factors

2011-05-05 Thread David Winsemius
On May 5, 2011, at 6:28 PM, J wrote: Hi, I'm requesting you don't berate me for asking this question: I clearly don't have the gist of factors. I have two dataframes, A and B. Each of them has a column containing strings (they're labels). I want to, one-by-one in a loop, compare the

Re: [R] factors

2011-05-05 Thread Ista Zahn
Hi Jonathan, On Thu, May 5, 2011 at 6:28 PM, J jonsle...@gmail.com wrote: Hi, I'm requesting you don't berate me for asking this question: I clearly don't have the gist of factors. I have two dataframes, A and B. Each of them has a column containing strings (they're labels). I want to,

Re: [R] hurdle, simulated power

2011-05-05 Thread Achim Zeileis
Dave: We are planning an intervention study for adolescent alcohol use, and I am planning to use simulations based on a hurdle model (using the hurdle() function in package pscl) for sample size estimation. The simulation code and power code are below -- note that at the moment the power

[R] [caret package] [trainControl] supplying predefined partitions to train with cross validation

2011-05-05 Thread Fabon Dzogang
Hi all, I run R 2.11.1 under ubuntu 10.10 and caret version 2.88. I use the caret package to compare different models on a dataset. In order to compare their different performances I would like to use the same data partitions for every models. I understand that using a LGOCV or a boot type

Re: [R] factors

2011-05-05 Thread Gabor Grothendieck
On Thu, May 5, 2011 at 6:28 PM, J jonsle...@gmail.com wrote: Hi, I'm requesting you don't berate me for asking this question: I clearly don't have the gist of factors. I have two dataframes, A and B. Each of them has a column containing strings (they're labels). I want to, one-by-one in a

Re: [R] factors

2011-05-05 Thread Jonathan
as.character() will enable me to do this in a loop (so thanks!). It looks like you guys are suggesting I accomplish this in some kind of vectorized fashion (David: yes, the number of rows are not equal - and I need to compare ALL pairs, not just adjacent pairs, so to vectorize, I suppose I'd have

[R] Using GSUB to obtain a printing \

2011-05-05 Thread Bhushan, Vipul
Hello. I'd like to be able to print variable strings which contain \ as-is, without interpreting (for example) abcde\nuvxyz as having an embedded newline (or whatever other escaped instruction). To do this, I've tried gsub, and here's some of my output (I've tried all kinds of variations to

Re: [R] Draw a nomogram after glm

2011-05-05 Thread Komine
Thanks Frank I will try rms package and give after the result. Komine -- View this message in context: http://r.789695.n4.nabble.com/Draw-a-nomogram-after-glm-tp3498144p3499771.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Using GSUB to obtain a printing \

2011-05-05 Thread William Dunlap
gsub does this because the string dsff\nfsd does not contain a backslash - the 5th character is a newline. The deparsed representation (used for printing the string) of a newline is \n but the string itself has not backslash. You can feed the output of deparse into message (or cat) so they show

Re: [R] functions pandit and treebase in the package apTreeshape

2011-05-05 Thread Andrew Robinson
Hi Arnau, please send the output of sessionInfo() and the exact commands and response that you used to install and load apTreeshape. Cheers Andrew On Thu, May 05, 2011 at 04:42:58PM +0200, Arnau Mir wrote: Hello. I'm trying to use the functions pandit and treebase. They are in the package

Re: [R] Vermunt's LEM in R

2011-05-05 Thread Andrew Robinson
Hi David, you might have more luck with your request if you tell us what Vermunt's LEM *does*, and provided some links to introductory reading material ... Cheers Andrew On Thu, May 05, 2011 at 03:34:02PM +, David Joubert wrote: Hello- Does anyone know of packages that could emulate

Re: [R] two-way group mean prediction in survreg with three factors

2011-05-05 Thread Andrew Robinson
Even then, I think that there's a problem. If C is in the model, then the response varies by C. The simplest way is to pick a value for C, and then evaluate the group mean estimates of A and B (and C). Something in my brain keeps asking whether another way to marginalize C for the purposes of

[R] Installing rgdal in R: correct -configure flags for GDAL install on Linux Redhat

2011-05-05 Thread Katrina Bennett
Hi, I'm installing rgdal but I keep having failures because I have not been able to find a good source of information for the correct configuration settings when installing GDAL. My error from the R install.packages(rgdal) is below. Can someone point me to a good source to tell me how to set

[R] MacKinnon critical value

2011-05-05 Thread Lee Schulz
Hello, I am doing an Engle Granger test on the residuals of two I(1) processes. I would like to get the MacKinnon (1996) critical value, say at 10%. I have 273 observations with 5 integrated explanatory variables , so that k=4. Could someone help me with the procedure in R? Thank you

Re: [R] help with a survplot

2011-05-05 Thread Frank Harrell
Hi Marco, You're welcome. The number at risk at given time points is a fairly standard thing to add to survival plots. I don't think many people will confuse it with numbers of events. Personally I find shaded confidence bands a bit more helpful but both are useful. Frank Marco Barbàra-2

Re: [R] Installing rgdal in R: correct -configure flags for GDAL install on Linux Redhat

2011-05-05 Thread Andrew Robinson
Hi Katrina, the error message below is actually pretty explicit. Have you installed the PROJ.4 library? If not, then you need to install it. When I had to do this I think that I used macports: sudo port install proj Then you need to tell configure where to find it, using the protocol

Re: [R] MacKinnon critical value

2011-05-05 Thread David Winsemius
On May 5, 2011, at 9:10 PM, Lee Schulz wrote: Hello, I am doing an Engle Granger test on the residuals of two I(1) processes. I would like to get the MacKinnon (1996) critical value, say at 10%. I have 273 observations with 5 integrated explanatory variables , so that k=4. Could

Re: [R] Vermunt's LEM in R

2011-05-05 Thread Wincent
I guess LEM is a software for latent class analysis. If so, you may want to have a look at poLCA package. Regards Ronggui On 5 May 2011 23:34, David Joubert jo...@hotmail.com wrote: Hello- Does anyone know of packages that could emulate what J. Vermunt's LEM does ? What is the closest

Re: [R] memory and bootstrapping

2011-05-05 Thread Tim Hesterberg
(Regarding bootstrapping logistic regression.) If the number of rows with Y=1 is small, it doesn't matter that n is huge. If both number of successes and failures is huge, then ad Ripley notes you can use asymptotic CIs. The mean difference in predicted probabilities is a nonlinear function of

[R] Bug in lattice that shipped with R 2.13.0

2011-05-05 Thread Deepayan Sarkar
Hi all, I had meant to make this announcement earlier but had forgotten (a recent bug report reminded me). The version of lattice that ships with R 2.13.0 has a fairly serious bug in panel.abline (which would neglect to draw many negative slope lines). If you use lattice with R 2.13.0, you

<    1   2