Re: [R] Help with setting the y-axis in a plot.

2011-03-18 Thread Joshua Wiley
Hi Caitlin, You just need to set the ylim argument to plot (you already did but g_range is 0, 13 not 0, 15. So... On Thu, Mar 17, 2011 at 10:49 PM, Caitlin bioprogram...@gmail.com wrote: Hi all. I'm working on an assignment for a psychology class and I am not sure how to adjust the y-axis

[R] Slope comparision

2011-03-18 Thread Антон Морковин
Hi all, I need to test the significnce of difference between slopes of two regression lines and regression line with theoretical line. Is it correct to use t-test in this situation? Here is my script: library(car) d1-data.frame(P1=c(1,2,3,5,7,8,9,13,14,15),

[R] help regarding RPostgreSQL and R 2.12.2

2011-03-18 Thread Shaunak Bangale
Hi R-team, While using R 2.12.2, I came across a problem that it doesn't have RPostgreSQL package in the list of install packages. As my original code was written in R 2.11.1, I could use the RPostgreSQL package. I am moving to R 2.12.2 to use the newly added package xtable in newer version R

[R] Problem with Slope.test function

2011-03-18 Thread Антон Морковин
Hi all, I need to test the significnce of difference between slopes of two regression lines and regression line with theoretical line. I try to use Slope.test function from emu package, but an error occured... library(emu) d1-data.frame(P1=c(1,2,3,5,7,8,9,13,14,15),

Re: [R] help please: put output into dataframe

2011-03-18 Thread Dennis Murphy
Hi: Is this what you're after? fout - function(x) { lim - median(x) + c(-2, 2) * mad(x) x[x lim[1] | x lim[2]] } apply(datafr1, 2, fout) $var1 [1] 17.5462078 18.4548214 0.7083442 1.9207578 -1.2296787 17.4948240 [7] 19.5702558 1.6181150 20.9791652 -1.3542099 1.8215087

Re: [R] confirmatory factor analysis program in R

2011-03-18 Thread Dennis Murphy
The following search: library(sos) findFn('confirmatory factor analysis') finds several potential matches, the most direct of which appears to be the cfa() function in package lavaan. HTH, Dennis On Thu, Mar 17, 2011 at 7:28 PM, rvohen bingbingzhan...@126.com wrote: Does someone have

Re: [R] Persistent storage between package invocations

2011-03-18 Thread Henrik Bengtsson
On Wed, Mar 16, 2011 at 6:00 AM, Hadley Wickham had...@rice.edu wrote: No.  First, please use path.expand(~) for this, and it does not necessarily mean the home directory (and in principle it might not expand at all).  In practice I think it will always be *a* home directory, but on Windows

Re: [R] calculating AUCs for each of the 1000 boot strap samples

2011-03-18 Thread taby gathoni
Brian, Thanks for the insights, i did manage to play around with the sample sizes and I have got some better results with both ROCR and pROC Thanks also to Andrija for providing the main code and insights. Thanks alot Taby --- On Thu, 3/17/11, Brian Diggs dig...@ohsu.edu wrote:

Re: [R] lmm WITHOUT random factor (lme4)

2011-03-18 Thread ONKELINX, Thierry
Dear Mark, I'm cc'ing this to the mixed models list to get some input from other experts. For them a link to the entire thread: http://r.789695.n4.nabble.com/lmm-WITHOUT-random-factor-lme4-tp3384054p3384823.html My comment was based on what I have read in Zuur et al. (2009). What worries me

Re: [R] R² for non-linear model

2011-03-18 Thread Dieter Menne
Bert Gunter wrote: You can't. R^2 has no (consistent, sensible) meaning for nonlinear models. If you don't understand why not, get local help or do some reading. There is no doubt that you are right, but Anna's question only shows that she is sandwiched between reviewers/supervisors who

Re: [R] R² for non-linear model

2011-03-18 Thread Rubén Roa
-Mensaje original- De: Kjetil Halvorsen [mailto:kjetilbrinchmannhalvor...@gmail.com] Enviado el: jueves, 17 de marzo de 2011 16:19 Para: Rubén Roa CC: Alexx Hardt; r-help@r-project.org Asunto: Re: [R] R² for non-linear model see inline. On Thu, Mar 17, 2011 at 4:58 AM, Rubén

Re: [R] plotting multiple figures on one page

2011-03-18 Thread Jim Lemon
scarlet wrote: Jim, Thanks for looking into this. The c without paste works. If the rq model overrides the mfrow, I think I will have to piece together individual plots using other software. I had a look at the plot.summary.rqs function and it does work out its own mfrow value and then

Re: [R] Histograms with strings,

2011-03-18 Thread Jim Lemon
On 03/18/2011 09:06 AM, Khanvilkar, Shashank wrote: Hello, Thanks in advance for any help, I have read a CSV file in which there is a column for an IP addr as in: tmpInFile$V2 [1] 74.125.224.38 74.125.224.38 129.46.71.19 129.46.71.19 [5] 129.46.71.19 129.46.71.19 129.46.71.19

Re: [R] help regarding RPostgreSQL and R 2.12.2

2011-03-18 Thread Prof Brian Ripley
You haven't even told us your OS, but it sounds like it might be Windows. In any case, RPostgreSQL is (like RMySQL) not distributed in binary form, and you need to compile it from the sources against your PostgreSQL version (which does matter, including the compiler used to build it). This

Re: [R] Persistent storage between package invocations

2011-03-18 Thread Martin Maechler
It would be nice to have a standard directory where R can write things this way. A semi-standard directory is given by Sys.getenv(R_LIBS_USER), which defaults to ~/R/.../. Maybe ~/R/ could serve as that convention? That way we (various developers etc) would also not

Re: [R] Beginner question: How to replace part of a filename in read.csv?

2011-03-18 Thread pierz
Thank you both, it works! -- View this message in context: http://r.789695.n4.nabble.com/Beginner-question-How-to-replace-part-of-a-filename-in-read-csv-tp3384786p3386724.html Sent from the R help mailing list archive at Nabble.com. __

[R] predict.nlme

2011-03-18 Thread elena01
Hi folks, I am having trouble to plot a mixed model analysis of covariance (ANCOVA). To do so I use the function predict in nlme but the line that is being drawn is totally out of control!!! here is my script (where MASS_S is dry mass and MASS_F is fresh mass): MEN-read.table(Mentha_lme2.txt,

Re: [R] lmm WITHOUT random factor (lme4)

2011-03-18 Thread Mark Difford
Apologies to all for the multiple posting. Don't know what caused it. Maybe it _is_ time to stop using Nabble after all... Regards, Mark. -- View this message in context: http://r.789695.n4.nabble.com/lmm-WITHOUT-random-factor-lme4-tp3384054p3386833.html Sent from the R help mailing list

Re: [R] lmm WITHOUT random factor (lme4)

2011-03-18 Thread Mark Difford
On Mar 18, 2011; 10:55am Thierry Onkelinx wrote: Furthermore, I get an error when doing an anova between a lm() and a lme() model. Hi Thierry, You get this error because you have not done the comparison the way I said you should, by putting the lme$obj model first in the call to anova(). This

[R] akima::interp scales of x and y are too dissimilar

2011-03-18 Thread Michael Bach
Dear R users, I want to do a fitted.contour plot of selected columns of a dataframe M with M$AM and M$Irradiance as x and y axes respectively. The level of the contour shall be determined by M$PR. Some words on my data first. Dataframe M looks like: head(M$Irradiance) [1] 293 350 412 419 477

Re: [R] Problem with Slope.test function

2011-03-18 Thread Daniel Kaschek
Hi Антон, my approach would be to use the estimated variance of the slope estimator. For your regression models m1 and m2 you can enter vcov(m1) vcov(m2) to get the variance-covariance matrix of m1 and m2. Then, assuming that the slope estimator is normal, you compute the p-value for slope_theo

[R] median survival time from survfit

2011-03-18 Thread Dunia Scheid
Hello, I am trying to compute the mdeian of the survival time from the function survfit: fit - survfit(Surv(time, status) ~ 1) fit Call: survfit(formula = Surv(time, status) ~ 1) records n.max n.start events median 0.95LCL 0.95UCL 111 111 111 20 NA NA NA

Re: [R] akima::interp scales of x and y are too dissimilar

2011-03-18 Thread Duncan Murdoch
On 18/03/2011 6:37 AM, Michael Bach wrote: Dear R users, I want to do a fitted.contour plot of selected columns of a dataframe M with M$AM and M$Irradiance as x and y axes respectively. The level of the contour shall be determined by M$PR. Some words on my data first. Dataframe M looks like:

Re: [R] Replace split with regex for speed ?

2011-03-18 Thread Henrique Dallazuanna
Try this: sub(\\.(\\d+)$, \\1, ts) On Thu, Mar 17, 2011 at 11:01 PM, rivercode aqua...@gmail.com wrote: Have timestamp in format HH:MM:SS.MMM.UUU and need to remove the last . so it is in format HH:MM:SS.MMMUUU. What is the fastest way to do this, since it has to be repeated on millions

Re: [R] median survival time from survfit

2011-03-18 Thread Marc Schwartz
On Mar 18, 2011, at 6:06 AM, Dunia Scheid wrote: Hello, I am trying to compute the mdeian of the survival time from the function survfit: fit - survfit(Surv(time, status) ~ 1) fit Call: survfit(formula = Surv(time, status) ~ 1) records n.max n.start events median 0.95LCL 0.95UCL

[R] general question about dropping terms of glm model fits

2011-03-18 Thread Sacha Viquerat
hello dear list! as I am currently helping someone with their statistical analysis of a count survey, I stumbled upon a very basic question upon model optimization: when fitting a model like: model-lmer(abundance~(x+y+z)^3,family=poisson,...) in which x,y,z are continuous abiotic parameters

[R] predict lm doubt

2011-03-18 Thread barbara costa
Hello, does anyone knows this predict is not resulting? # lm predict dfTestes3sitesCriptic$Velocity_corrected - ifelse (dfTestes3sitesCriptic$Season == A dfTestes3sitesCriptic$BeforeAfter == Before, (dfTestes3sitesCriptic$Velocity * mVel3ABefAfter), (ifelse (dfTestes3sitesCriptic$Season == Sp

Re: [R] predict lm doubt

2011-03-18 Thread Henrique Dallazuanna
Your lm args are wrong: Try this: predict(lm(Dens_min ~ Velocity, dfTestes3sitesCriptic)) or predict(lm(Dens_min ~ Velocity_corrected, dfTestes3sitesCriptic)) On Fri, Mar 18, 2011 at 9:45 AM, barbara costa rbarbar...@gmail.com wrote: Hello,  does anyone knows this predict is not resulting?

Re: [R] akima::interp scales of x and y are too dissimilar

2011-03-18 Thread Michael Bach
Thank you very much Duncan, I sorted it out. Your advice helped me to be sure about the column range so I could track down my error. For anyone who is interested: Inside my plot meta script I reference the arg x column as M[[x]]. It turned out that the other data set used slightly different

[R] PREDICTIONS from a PIECEWISE LINEAR (mixed) MODEL: THEY AIN'T LINEAR BETWEEN BREAK POINTS!!

2011-03-18 Thread Federico Bonofiglio
I Dears, if that wouldn't take u too much effort I'd like to ask for a swift opinion: I have a alinear (mixed effect) model that I wish to run as a piecewise one. When I predict the values Iget quite some odds and disturbing results: The predicted stright line after the break point is not

[R] adding a cubic spline to a model

2011-03-18 Thread Ellen Janssen
@font-face { font-family: MS 明朝; }@font-face { font-family: Verdana; }@font-face { font-family: Verdana; }@font-face { font-family: Monaco; }p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: Verdana; }.MsoChpDefault {

Re: [R] help please: put output into dataframe

2011-03-18 Thread Ram H. Sharma
Hi Dennis and R-users Thank you for more help. I am pretty close, but challenge still remain is forcing the output with different length to output dataframe. x - data.frame(apply(datafr1, 2, fout)) Error in data.frame(var1 = c(-0.70777998321315, 0.418602152926712, 2.08356737154810, :

[R] exploring dist()

2011-03-18 Thread bra86
Hello, everybody, I hope somebody could help me with a dist() function. I have a data frame of size 2*4087 (col*row), where col corresponds to the treatment and rows are species, values are Hellinger distances, I should reconstruct a distance matrix with a dist() function. I know that euclidean

Re: [R] Replace split with regex for speed ?

2011-03-18 Thread rex.dwyer
That's a good solution, but if you're really, really sure that the timestamps are in the format you gave, it's quite a bit faster to use substr and paste, because you don't have to do any searching in the string. HTH Rex x = rep(09:30:00.000.633,100)

Re: [R] Spatial cluster analysis of continous outcome variable

2011-03-18 Thread David Winsemius
On Mar 17, 2011, at 10:45 PM, Jon Toledo wrote: I read it but it said PDF file and Ps, didn´t specify which other files, so I attached a csv file, which I thought would work. The last time I read it, it said .pdf and .txt. I doubt that it has changed since then. I admit that I originally

Re: [R] exploring dist()

2011-03-18 Thread Sarah Goslee
It isn't quite clear what you're doing. Do you already have distances calculated elsewhere and imported into R? If so, then if you import the *full symmetric* distance matrix, you can convert it into a distance object using as.dist(). If you only have the lower triangle, you can use eg full()

Re: [R] pattern of panel waves using R

2011-03-18 Thread David Winsemius
On Mar 17, 2011, at 11:40 PM, Sebastián Daza wrote: Hi everyone, Is there any command to identify the pattern of responses of a database with this format: year id 20081 20091 20082 20092 20083 20093 20084 20094 20104 Two methods assuming this is in a

Re: [R] help please: put output into dataframe

2011-03-18 Thread jim holtman
I think it was suggested that you save your output to a 'list' and then you will have it in a format that can accept variable numbers of items in each element and it is also in a form that you can easily process it to create whatever other output you might need. On Fri, Mar 18, 2011 at 7:24 AM,

Re: [R] Spatial cluster analysis of continous outcome variable

2011-03-18 Thread Jon Toledo
Sorry again. I think if you click on the slow download is free.However I attach the CSV in txt. CC: r-help@r-project.org From: dwinsem...@comcast.net To: tintin...@hotmail.com Subject: Re: [R] Spatial cluster analysis of continous outcome variable Date: Fri, 18 Mar 2011 09:48:46 -0400

[R] Does RHIPE support R on Windows as the user desktop environment?

2011-03-18 Thread XiaoboGu
Hi, Since we can’t access Google Groups here in China, so please forgive me if anyone has asked this question before. Sincerely Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Installing rJava fails

2011-03-18 Thread jcheng liu
Dear all, Installing rJava fails. The message was listed below. I wonder why cpp flag could not be detected, although I had installed. Thanks!!! -Jiacheng R CMD INSTALL rJava_0.9-0.tar.gz * installing to library ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’ * installing *source*

Re: [R] help please: put output into dataframe

2011-03-18 Thread Ram H. Sharma
Thanks, Jim for the idea. I tried with save as list. I can not write to a table with write.table, I could not find a function that is write.list or equivalent. Even if it is list I think it would be difficult to post-processing than as table. outx- as.list(apply(datafr1, 2, fout)) write.table

[R] colour palette for positive/negative range

2011-03-18 Thread Frank Schwach
Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and the positive ones in shadea of red. Basically, I want exactly what the RColorBrewer palette RdBu does but with more of a gradual change (the RdBu can only give me

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Barry Rowlingson
On Fri, Mar 18, 2011 at 3:37 PM, Frank Schwach f...@sanger.ac.uk wrote: Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and the positive ones in shadea of red. Basically, I want exactly what the RColorBrewer

Re: [R] help please: put output into dataframe

2011-03-18 Thread David Winsemius
On Mar 18, 2011, at 10:53 AM, Ram H. Sharma wrote: Thanks, Jim for the idea. I tried with save as list. I can not write to a table with write.table, I could not find a function that is write.list or equivalent. Even if it is list I think it would be difficult to post-processing than as

Re: [R] A question about list

2011-03-18 Thread ufuk beyaztas
Many thanks to all -- View this message in context: http://r.789695.n4.nabble.com/A-question-about-list-tp3385711p3387410.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Difficulty with 'loess' function

2011-03-18 Thread armstrwa
Hi, I am trying to create a loess smooth from hydrologic data. My goal is to create a smooth line that describes discharge at a certain point in time. I have done this using the 'lowess' function and had no problem, but I'm having some difficulty with loess. I am inputting the date ('date')

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Kevin Wright
Some ideas for you... RedWhiteBlue - colorRampPalette(c(firebrick,white,#023868)) RedGrayBlue - colorRampPalette(c(firebrick, lightgray, #023868)) RedWhiteBlue2 - colorRampPalette(c(red,white,blue)) RedGrayBlue2 - colorRampPalette(c(red, lightgray, blue)) pie(rep(1,21), col=RedWhiteBlue(21))

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Achim Zeileis
On Fri, 18 Mar 2011, Frank Schwach wrote: Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and the positive ones in shadea of red. Basically, I want exactly what the RColorBrewer palette RdBu does but with more of

Re: [R] colour palette for positive/negative range

2011-03-18 Thread Frank Schwach
brilliant, thanks guys! diverge_hsv is perfect. Frank On Fri, 2011-03-18 at 16:47 +0100, Achim Zeileis wrote: On Fri, 18 Mar 2011, Frank Schwach wrote: Hi, I'm plotting a heatmap with values ranging from -10 to +10 and I would like the negative values to show up in shades of blue and

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread Bert Gunter
Well, you might start by reading the Help file for loess and specifying the model via a formula, as described there. The docs say your input is coerced to a formula -- but obviously not the one you want. Specify it explicitly. -- Bert On Fri, Mar 18, 2011 at 8:34 AM, armstrwa

Re: [R] help please: put output into dataframe

2011-03-18 Thread jim holtman
The easiest thing is to use 'save' so that you write the object out as binary. If you don't need 'text', then save/load is the way to operate with the data. On Fri, Mar 18, 2011 at 10:53 AM, Ram H. Sharma sharma.ra...@gmail.com wrote: Thanks, Jim for the idea. I tried with save as list. I can

Re: [R] Does RHIPE support R on Windows as the user desktop environment?

2011-03-18 Thread Saptarshi Guha
Hello, I should see how to mirror a google group (if indeed possible). There are few things stopping from having RHIPE work on the remote while the client sends queries from a Windows client. But as of now, it does not work. Regards Saptarshi On Fri, Mar 18, 2011 at 7:50 AM, XiaoboGu

Re: [R] median survival time from survfit

2011-03-18 Thread Dunia Scheid
Many thanks! 2011/3/18 Marc Schwartz marc_schwa...@me.com On Mar 18, 2011, at 6:06 AM, Dunia Scheid wrote: Hello, I am trying to compute the mdeian of the survival time from the function survfit: fit - survfit(Surv(time, status) ~ 1) fit Call: survfit(formula = Surv(time,

Re: [R] [R-sig-ME] PREDICTIONS from a PIECEWISE LINEAR (mixed) MODEL: THEY AIN'T LINEAR BETWEEN BREAK POINTS!!

2011-03-18 Thread Ben Bolker
On 11-03-18 08:42 AM, Federico Bonofiglio wrote: I Dears, if that wouldn't take u too much effort I'd like to ask for a swift opinion: I have a alinear (mixed effect) model that I wish to run as a piecewise one. When I predict the values Iget quite some odds and disturbing results: The

Re: [R] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
Run R CMD javareconf -e as the being suggest by the output. That will try to guess where is Java. Or you can install the JDK_HOME and JAVA_HOME variables. Good luck. Caveman On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu jcheng@gmail.com wrote: Dear all, Installing rJava fails. The message

[R] subset data frame with condition

2011-03-18 Thread Nicolas Gutierrez
Hello, One more question.. I have the data.frame pop: xloc yloc gonad indEneW Area 123 20 516.74 1 0.02 20.21 1 223 20 1143.20 1 0.02 20.21 1 323 20 250.00 1 0.02 20.21 1 422 15 251.98 1 0.02 18.69 2 522 15 598.08 1

Re: [R] subset data frame with condition

2011-03-18 Thread Henrique Dallazuanna
Try this: subset(pop, (ave(Area, Area, FUN = length) == 1 | ave(Area, Area, FUN = function(x)cumsum(prop.table(x))) 0.7 Area %in% 1:3)) On Fri, Mar 18, 2011 at 2:48 PM, Nicolas Gutierrez nicol...@uw.edu wrote: Hello, One more question.. I have the data.frame pop:    xloc yloc  gonad  

Re: [R] subset data frame with condition

2011-03-18 Thread Petr Savicky
On Fri, Mar 18, 2011 at 10:48:44AM -0700, Nicolas Gutierrez wrote: Hello, One more question.. I have the data.frame pop: xloc yloc gonad indEneW Area 123 20 516.74 1 0.02 20.21 1 223 20 1143.20 1 0.02 20.21 1 323 20 250.00 1 0.02

Re: [R] Conditional coloring

2011-03-18 Thread Pavan G
Mighty thanks Peter. This does precisely what I wanted. Thanks again. On Mon, Mar 14, 2011 at 4:52 PM, Peter Langfelder peter.langfel...@gmail.com wrote: On Mon, Mar 14, 2011 at 1:06 PM, Pavan G pavan.n...@gmail.com wrote: Hello All, I have a histogram with values above and below 0. I

[R] Understanding tryCatch

2011-03-18 Thread steven mosher
I've read the help and the archives on tryCatch but I'm still stuggling trying to understand how it works exactly and how I can use it to get the result I need. I have a data.frame of urls which point to 11 .zip files. Basically I use RCurl to get the list of files from a ftp and then reduce that

Re: [R] Understanding tryCatch

2011-03-18 Thread Jonathan P Daily
tryCatch will only execute it's error function on errors. If you are getting warnings, you may find it helpful to set: options(warn = 2) ?options tryCatch(warning(!), error = function(x) print(Error!)) -- Jonathan P. Daily Technician - USGS Leetown Science

Re: [R] subset data frame with condition

2011-03-18 Thread Petr Savicky
On Fri, Mar 18, 2011 at 10:48:44AM -0700, Nicolas Gutierrez wrote: Hello, One more question.. I have the data.frame pop: xloc yloc gonad indEneW Area 123 20 516.74 1 0.02 20.21 1 223 20 1143.20 1 0.02 20.21 1 323 20 250.00 1 0.02

Re: [R] Understanding tryCatch

2011-03-18 Thread Henrique Dallazuanna
Try this: tryCatch(log(rnorm(10)), warning = function(m)deparse(m$call[[2]])) Where log(rnorm(10)) is your expr to evaluate. On Fri, Mar 18, 2011 at 4:04 PM, steven mosher mosherste...@gmail.com wrote: I've read the help and the archives on tryCatch but I'm still stuggling trying to

Re: [R] date conversion

2011-03-18 Thread Patrick Connolly
On Wed, 16-Mar-2011 at 07:58PM -0700, Joshua Wiley wrote: | Hi Erin, | | I am not sure what a seq.Date object is. My first thought is that | you are talking about the date method for seq(), but there are | hundreds of packages I do not know. In any case, here is what I think | you want. | |

Re: [R] date conversion

2011-03-18 Thread Joshua Wiley
Hi Patrick, On Fri, Mar 18, 2011 at 12:17 PM, Patrick Connolly p_conno...@slingshot.co.nz wrote: On Wed, 16-Mar-2011 at 07:58PM -0700, Joshua Wiley wrote: | ## A small example is always nice | dat - ts(1:12, frequency = 12, |   start = c(1998, 1), end = c(2010, 12)) | | ## Achim and Gabor's

Re: [R] Understanding tryCatch

2011-03-18 Thread steven mosher
That works # hydeUrls = vector of urls to file names #destList = vector of destination file names for(files in 1:length(hydeUrls)){ filesFailed[files]- FALSE filesFailed[files] -

Re: [R] subset data frame with condition

2011-03-18 Thread Nicolas Gutierrez
perfect, thanks Henrique! Nico On 3/18/2011 11:17 AM, Henrique Dallazuanna wrote: Try this: subset(pop, (ave(Area, Area, FUN = length) == 1 | ave(Area, Area, FUN = function(x)cumsum(prop.table(x))) 0.7 Area %in% 1:3)) On Fri, Mar 18, 2011 at 2:48 PM, Nicolas Gutierreznicol...@uw.edu

Re: [R] Arguments of a function

2011-03-18 Thread D Kelly O'Day
You need to change your second line: range - c(0.1, 0.5) runif(1, range[1], range[2]) -- View this message in context: http://r.789695.n4.nabble.com/Arguments-of-a-function-tp3387643p3388400.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Problem with Slope.test function

2011-03-18 Thread Антон Морковин
Good evening! Thanks for your answer, but I don't really understand how to use vcov matrix for comarision of multiple regression line slopes... I've read this theme about using t-test in slope comarision: http://www.mail-archive.com/r-help@r-project.org/msg01713.html but how to use it in case

[R] import data

2011-03-18 Thread AlexSmith
Hi, How do I read just the first line of a data file in R? (it does not contain labels) Thanks in advance, Alex. -- View this message in context: http://r.789695.n4.nabble.com/import-data-tp3387620p3387620.html Sent from the R help mailing list archive at Nabble.com.

[R] XYPlot Conditioning Variable in Specific, Non-Alphanumeric Order.

2011-03-18 Thread Guy Jett
# I need to create an xyplot() where I control the specific order of # both my conditioning variables. The default code below plots the # data correctly (dispersed across all 14 columns), but fails in two # ways. Both the primary conditioning variable (Transect), and the # secondary

[R] Arguments of a function

2011-03-18 Thread Lisa
Hi, everybody, I just want to pass arguments to a function as below: range - c(0.1, 0.5) runif(1, range) But it doesn’t work. Does anyone have any suggestions to offer? Thanks. Lisa -- View this message in context:

[R] Need help with error

2011-03-18 Thread Savitri N Appana
Hi R users, I am getting the following error when using the splsda function in R v2.12.1: Error in switch(classifier, logistic = { : EXPR must be a length 1 vector What does this mean and how do I fix this? Thank you in advance! Best, Savi __

Re: [R] help please: put output into dataframe

2011-03-18 Thread Ram H. Sharma
I wish has simpler solution, apprently simple problem ! thanks for help. On Fri, Mar 18, 2011 at 10:04 AM, jim holtman jholt...@gmail.com wrote: I think it was suggested that you save your output to a 'list' and then you will have it in a format that can accept variable numbers of items in

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread armstrwa
Yeah, I did look at the help(loess) page, but I wasn't really sure what to do with that. I was inputting it as: test-loess(date ~ q,data.frame(date,q),span=0.5) test Call: loess(formula = date ~ q, data = data.frame(date, q), span = 0.5) Number of Observations: 96 Equivalent Number of

Re: [R] Installing rJava fails

2011-03-18 Thread jcheng liu
Dear Orvalho Augusto, Thank so much for you response! We had run R CMD javareconf -e, and even R CMD javareconf in administrator. Actually, we had install the JDK. And in the output, only the item of JNI cpp flages could not be detected(I listed output below). What does the item mean? What need

[R] keep color range constant across three persp() graphs

2011-03-18 Thread Tali
Hi All. I have created two, 3-D, color graphs using persp(). Z values range from 1 to 100 on the first plot, and 0.5 to 50 on the second plot. I would like to keep the color range constant between the two graphs, rather than each graph showing the full range of colors. So the first graph should

[R] BFGS and Neldear-Mead

2011-03-18 Thread LC-Bea
Hello! I´m doing this: A-optim(vv,pen.wlsv,method=BFGS) B-optim(vv,pen.wlsv,method=Nelder-Mead) the function is the same and the initial values too the estimate values are different, very different, at the first decimal is there an error? or maybe its because of my data, or funtion to

[R] time series from timed data

2011-03-18 Thread Sam Steingold
Hi, I have data with multiple sub-second entries: 2011/03/15 09:32:15.035619,-0.403103,1.09664,48.6,126.92,117.32 2011/03/15 09:32:15.069331,-0.39851,1.09874,48.6,126.92,117.32 2011/03/15 09:32:15.289135,-0.402463,1.10084,48.59,126.92,117.32 2011/03/15

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread nblarson
Flip date and q in your formula, you've got them backwards from what you've said you're trying to model. armstrwa wrote: Yeah, I did look at the help(loess) page, but I wasn't really sure what to do with that. I was inputting it as: test-loess(date ~ q,data.frame(date,q),span=0.5)

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread armstrwa
lt;!DOCTYPE html PUBLIC quot;-//W3C//DTD HTML 4.01 Transitional//ENquot;gt; That would certainly help, haha.nbsp; Thank you for catching that error.nbsp; Do you happen to know what exactly '~' means in R? Thanks again. Billy nblarson [via R] wrote: Flip date and q in your formula,

Re: [R] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
It seems that you are not alone with that error ( http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing). Defining only JAVA_HOME he would find everything else. Backup your /etc/R before do this. Running the R CMD javareconf is to place variables like this in

[R] points() rendering points outside of input

2011-03-18 Thread Adam Hyland
As a followup to pi-day, I attempted to make a .gif of a simulation based estimation of pi by plotting points inside a single quadrant of a circle (a la http://www.drewconway.com/zia/?p=2667 ).  When rendering the individual x,y pairs with points() I intermittently see points crop up around

Re: [R] import data

2011-03-18 Thread David Winsemius
On Mar 18, 2011, at 12:05 PM, AlexSmith wrote: Hi, How do I read just the first line of a data file in R? (it does not contain labels) read.table has an `nrow` argument and readLines has an `n` argument. Thanks in advance, Alex. -- View this message in context:

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread David Winsemius
On Mar 18, 2011, at 4:00 PM, armstrwa wrote: lt;!DOCTYPE html PUBLIC quot;-//W3C//DTD HTML 4.01 Transitional// ENquot;gt; That would certainly help, haha.nbsp; Thank you for catching that error.nbsp; Do you happen to know what exactly '~' means in R? ?formula It separates the left

Re: [R] XYPlot Conditioning Variable in Specific, Non-Alphanumeric Order.

2011-03-18 Thread David Winsemius
On Mar 18, 2011, at 4:13 PM, Guy Jett wrote: # I need to create an xyplot() where I control the specific order of # both my conditioning variables. The default code below plots the # data correctly (dispersed across all 14 columns), but fails in two # ways. Both the primary conditioning

Re: [R] BFGS and Neldear-Mead

2011-03-18 Thread Petr Savicky
On Fri, Mar 18, 2011 at 11:27:58AM -0700, LC-Bea wrote: Hello! I´m doing this: A-optim(vv,pen.wlsv,method=BFGS) B-optim(vv,pen.wlsv,method=Nelder-Mead) the function is the same and the initial values too the estimate values are different, very different, at the first decimal is

Re: [R] Arguments of a function

2011-03-18 Thread Bert Gunter
?do.call ## read it CAREFULLY, please. do.call(runif,as.list(c(1,range))) -- Bert On Fri, Mar 18, 2011 at 9:10 AM, Lisa lisa...@gmail.com wrote: Hi, everybody, I just want to pass arguments to a function as below: range - c(0.1, 0.5) runif(1, range) But it doesn’t work. Does anyone

[R] Plotting Finite Element and Finite Difference Results together

2011-03-18 Thread emorway
As a simplification of a much larger problem, I'm using the following simple example to explore ways of getting the finite difference results to plot over the same extents as the finite element solution (see figure). I haven't discovered (if it exist) a way of getting the finite difference data

Re: [R] time series from timed data

2011-03-18 Thread Gabor Grothendieck
On Fri, Mar 18, 2011 at 2:19 PM, Sam Steingold s...@gnu.org wrote: Hi, I have data with multiple sub-second entries: 2011/03/15 09:32:15.035619,-0.403103,1.09664,48.6,126.92,117.32 2011/03/15 09:32:15.069331,-0.39851,1.09874,48.6,126.92,117.32 2011/03/15

Re: [R] BFGS and Neldear-Mead

2011-03-18 Thread Ravi Varadhan
It is important to pay attention to the convergence message. For example, if the convergence is due to reaching maximum iteration limit (this is often the case with Nelder-Mead), then you should increase the maxit from 500 to 1500 or something like that. Users generally have trouble interpreting

[R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Brigid Mooney
I'm not trying to start a Windows vs. Linux debate, but I've been using R on a Windows machine for a while, and was recently wondering if R's performance would be faster on a Linux machine. And similarly, if any incremental increase in processing speed would be worth the time it would take me to

Re: [R] general question about dropping terms of glm model fits

2011-03-18 Thread Frank Harrell
It will distort statistical inference to drop any terms on the basis of P-values, AIC, etc.. If you drop terms, use the hierarchy principle. High correlations between variables don't necessarily invalidate a test. Frank Sacha Viquerat-2 wrote: hello dear list! as I am currently helping

Re: [R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Liviu Andronic
On Fri, Mar 18, 2011 at 11:00 PM, Brigid Mooney bkmoo...@gmail.com wrote: I'm not trying to start a Windows vs. Linux debate, but I've been using R on a Windows machine for a while, and was recently wondering if R's performance would be faster on a Linux machine.  And similarly, if any

Re: [R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Caitlin
Hi Brigid, I haven't used it yet, but I would suggest profiling your code with 'Rprof' on both a Windows and Linux machine. ?Rprof for details. Hope this helps, ~Caitlin On Fri, Mar 18, 2011 at 3:00 PM, Brigid Mooney bkmoo...@gmail.com wrote: I'm not trying to start a Windows vs. Linux

Re: [R] points() rendering points outside of input

2011-03-18 Thread Peter Ehlers
On 2011-03-18 13:28, Adam Hyland wrote: As a followup to pi-day, I attempted to make a .gif of a simulation based estimation of pi by plotting points inside a single quadrant of a circle (a la http://www.drewconway.com/zia/?p=2667 ). When rendering the individual x,y pairs with points() I

Re: [R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Spencer Graves
Others can discuss the comparative speed. I recently installed Linux on a new quad core computer I purchased. I found it surprisingly easy to learn how to do the things I needed. Now the hard drive is dying on my Vista notebook computer. In shopping for a replacement, I likely will

[R] Generating repeated measures data

2011-03-18 Thread John Sorkin
How would one generate data to be used in a simulation of a repeated measures ANOVA given a known (1) within-person correlation with known (2) mean and SD of data obtained at each of three times of observation? Thanks, John John Sorkin Chief Biostatistics and Informatics Univ. of Maryland School

Re: [R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Shige Song
One thing that Linux makes trivially easy is to interpolate R with C++ through the Rcpp package. The GCC compiler collection is part of all mainstream Linux distro. This is, however, not the case with Windows: you may be able to do it eventually (not sure about this point), but it takes quite some

  1   2   >