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

2011-03-18 Thread XiaoboGu
> -Original Message- > From: Saptarshi Guha [mailto:saptarshi.g...@gmail.com] > Sent: Saturday, March 19, 2011 12:24 AM > To: XiaoboGu > Cc: r-help@r-project.org > Subject: Re: Does RHIPE support R on Windows as the user desktop environment? > > Hello, > > I should see how to mirror a g

[R] yi sent you a movie ticket redeemable at more than 200 nation wide theatre chains

2011-03-18 Thread yi
yi has chosen to send you a free movie ticket, up to $10 value. Sit back, relax, and enjoy! In an effort to spread the word about our great products we are allowing our members to send free movie tickets to their selected friends at no charge to our members. This time yi chose you! To redeem y

[R] yi sent you a movie ticket redeemable at more than 200 nation wide theatre chains

2011-03-18 Thread yi
yi has chosen to send you a free movie ticket, up to $10 value. Sit back, relax, and enjoy! In an effort to spread the word about our great products we are allowing our members to send free movie tickets to their selected friends at no charge to our members. This time yi chose you! To redeem y

Re: [R] [O/T] reference for regular expressions

2011-03-18 Thread Phil Spector
Erin - If you seriously want to learn about regular expressions, I would recommend "Mastering Regular Expressions" by Jeffrey Freidl. (http://oreilly.com/catalog/9781565922570). I don't think there's anything that's more thorough or authoritive. - Phi

Re: [R] pattern of panel waves using R

2011-03-18 Thread Sebastián Daza
Finally, I solved my problem using the following procedure and a database called ej ej$a <- 1 head(ej) ano nunico a 1 2008 1 1 2 2009 1 1 3 2008 2 1 4 2009 2 1 5 2008 3 1 6 2009 3 1 library(reshape) dej <- cast(ej, nunico ~ ano, sum, margins = FALSE) head(dej

[R] [O/T] reference for regular expressions

2011-03-18 Thread Erin Hodgess
Dear R People: Could someone recommend a good reference on regular expressions, please? Thanks in advance, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com

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

2011-03-18 Thread Duncan Murdoch
On 18/03/2011 8:43 PM, Shige Song wrote: 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

Re: [R] How do I delete multiple blank variables from a data frame?

2011-03-18 Thread Joshua Wiley
Hi Rita, This is far from the most efficient or elegant way, but: ## two column data frame, one all NAs d <- data.frame(1:10, NA) ## use apply to create logical vector and subset d d[, apply(d, 2, function(x) !all(is.na(x)))] I am just apply()ing to each column (the 2) of d, the function !all(is

Re: [R] Arguments of a function

2011-03-18 Thread Lisa
Thank you very much! -- View this message in context: http://r.789695.n4.nabble.com/Arguments-of-a-function-tp3387643p3388615.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

[R] How do I delete multiple blank variables from a data frame?

2011-03-18 Thread Rita Carreira
Dear List Members,I have 55 data frames, each of which with 272 variables and 267 observations. Some of these variables are blanks but the blanks are not the same for every data frame. I would like to write a procedure in which I import a data frame, see which variables are blank, and delete th

[R] apply function returning different results

2011-03-18 Thread Tanya Cashorali
For some reason when I apply a function to a single row in R it works, but when that same row is in a data.frame it does not, see below: apply(dx[954,], 1, query.db) 2571 1092 0.06044147 3890 0.05948577 3273 0.05911261 794 0.05855583 4241 0.05854064 3560 0.05602690 apply(dx[954

[R] lattice histogram function and groups

2011-03-18 Thread Evans, David G (DFG)
Hi, >From the following code (tweaked from another user): variable<-sample(rep(1:2,100)) individual<-rep(1:3, length(variable)) group<-rep(LETTERS[1:2],length(variable)/2) mydata<-data.frame(variable,individual,group) individual<-as.factor(individual) group<-as.factor(group) histogram(~

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

2011-03-18 Thread Andrzej Galecki
Hello Thierry, Based on the code below, it looks like you do not need to worry about likelihoods from lm() and gls(). They are defined the same way. I agree with you that caution needs to be exercised. Simply because mathematically the same likelihood may be defined using different constant.

Re: [R] Generating repeated measures data

2011-03-18 Thread Joshua Wiley
Hi John, This is not advanced enough for serious applications, but if you are just looking for a simple way to make example data, you could do something like: gencor <- function(order, mu, sd, r) { X <- matrix(rnorm(prod(order), mean = mu, sd = sd), nrow = order[1], ncol = order[2]) R <- matr

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

[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 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 in

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 interm

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 wrote: > I'm not trying to start a Windows vs. Linux debate, but I've been

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

2011-03-18 Thread Liviu Andronic
On Fri, Mar 18, 2011 at 11:00 PM, Brigid Mooney 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 incremental increase i

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 s

[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 m

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 t

Re: [R] time series from timed data

2011-03-18 Thread Gabor Grothendieck
On Fri, Mar 18, 2011 at 2:19 PM, Sam Steingold 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 09:32:15.289135,-0.402463,1.10084,48.59,126.

[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 to

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 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 have a

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

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 va

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread David Winsemius
On Mar 18, 2011, at 4:00 PM, armstrwa wrote: That would certainly help, haha.  Thank you for catching that error.  Do you happen to know what exactly '~' means in R? ?formula It separates the left hand side of a formul

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: http://r.789695.n4.nab

[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 (2,0.5)

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 /etc/R/Makecon

Re: [R] Difficulty with 'loess' function

2011-03-18 Thread armstrwa
That would certainly help, haha.  Thank you for catching that error.  Do you happen to know what exactly '~' means in R? Thanks again. Billy nblarson [via R] wrote: Flip date and q in your formula, you've got them backwar

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.

[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 09:32:15.296110,-0.450244,1.10063,48.59,126.9

[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 mi

[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 go

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 we

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 Para

[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 __ R-he

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 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 each element and

[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: http://r.789695.n4.nabble.com/Arguments-of-a-function-tp3387643p3387643

[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 conditi

[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. _

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 o

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] 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 Gutierrez wrote: Hello, O

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] <- tryCatch(download.file(url=hydeUrls[files],destfile=destList[files],quiet=FALSE,mode="wb"),warning

Re: [R] date conversion

2011-03-18 Thread Joshua Wiley
Hi Patrick, On Fri, Mar 18, 2011 at 12:17 PM, Patrick Connolly 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 wonderful pack

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] 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 wrote: > I've read the help and the archives on tryCatch but I'm still stuggling > trying to understand how it > works exac

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

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

[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] 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 wrote: > > Hello All, > > I have a histogram with values above and below 0. I would like to colo

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

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 wrote: > Hello, > > One more question.. I have the data.frame "pop": > >    xloc yloc  gonad  ind    En

[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

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 wrote: > Dear all, > Installing rJava fails. The message was listed below.

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: >

Re: [R] median survival time from survfit

2011-03-18 Thread Dunia Scheid
Many thanks! 2011/3/18 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, statu

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 wrote:

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 wrote: > Thanks, Jim for the idea. > > I tried with save as list. I can not write to a tabl

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 wrote: > Hi, > > I

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

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 a

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),

[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') and

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 https://stat.ethz.ch/mailman/li

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] colour palette for positive/negative range

2011-03-18 Thread Barry Rowlingson
On Fri, Mar 18, 2011 at 3:37 PM, 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 do

[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 11

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] 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* p

[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 gui

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

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, Ra

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] 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() fro

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 t

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) > system.time(y<-paste(substr(x,1,12)

[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] 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, : argume

[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 { f

[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 straigh

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 column

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 wrote: > Hello, >  does anyone knows this predict is not resulting? > > # lm predict >

[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 ==

[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

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.95

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 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 > of row

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: h

[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] 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] 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 509

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(). T

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 archive

[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] 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-help@r-project

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 n

  1   2   >