Re: [R] how to replace NA values in a list

2008-08-01 Thread Satoshi Takahama
- Original Message From: Shang Liu <[EMAIL PROTECTED]> Subject: [R] how to replace NA values in a list I have a matrix named "spec" (see below), it is a 6x3 matrix, and each element of spec is a list. For example, spec[1,"wavenumber"] is a list, and it contains 1876 numeric numbers and

[R] Multiple R console for OS X?

2008-08-01 Thread Anh Tran
Hi gang, I always open more than 1 R console in Windows. I can't figure out a way to do this with OS X yet. I need that to utilize the duo core on my desktop. How would I do that? -- Regards, Anh Tran [[alternative HTML version deleted]] __ R

[R] convert for loop into apply()

2008-08-01 Thread Anh Tran
Hi all,I know this topic has came up multiple times, but I've never fully understand the apply() function. Anyway, I'm here asking for your help again to convert this loop to apply(). I have 2 data frames with the following information: a1 is the fragment that is need to be covered, a2 is the pro

Re: [R] Eaxct position of specific elements in array

2008-08-01 Thread Gabor Grothendieck
See ?row ?col On Fri, Aug 1, 2008 at 1:42 PM, Ralph S. <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to get the positions in array coordinates (needed later) of > certain elements in an array but I am not sure how to get them. > > My array is Q and the condition is dt>dV, where dt and dV are

Re: [R] viewing data in something similar to 'R Data Editor'

2008-08-01 Thread Gabor Grothendieck
Try view in the svViews package. On Fri, Aug 1, 2008 at 1:29 PM, Rachel Schwartz <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to view matrices I am working with in a clean, easy to read, > separate window. > > A friend showed me how to do something like I want with edit(). I can view > the m

Re: [R] Colors in Sweave

2008-08-01 Thread Stephen Tucker
From: Duncan Murdoch Date: Tue, 29 Jul 2008 19:45:28 -0400 On 27/07/2008 3:10 PM, Stephen Tucker wrote: > Hi list, > > I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including: > > === >

[R] Bubble plots

2008-08-01 Thread Cody Hamilton
Is there a way to create a 'bubble plot' in R? For example, if we define the following data frame containing the level of y observed for 5 patients at three time points: time<-c(rep('time 1',5),rep('time 2',5),rep('time 3',5)) y<-c('a','b','c','d','a','b','c','a','d','a','a','a','b','c','d') D<-

Re: [R] Identifying common prefixes from a vector of words, and delete those prefixes

2008-08-01 Thread Martin Morgan
Daren Tan <[EMAIL PROTECTED]> writes: > For example, c("dog.is.an.animal", "cat.is.an.animal", > "rat.is.an.animal"). How can I identify the common prefix is > ".is.an.animal" and delete it to give c("dog", "cat", "rat") ? The 'Rlibstree' package from omegahat is quite fun for this sort of thing:

Re: [R] source a script file straight from a subversion repository

2008-08-01 Thread Steven McKinney
Thanks to Duncan Murdoch and Marc Schwartz for their excellent help. As we don't yet have the apache http: interface to svn running yet, 'svn export' is the access mechanism. As I don't want to leave stale files lying around, or clobber a local file should there be one with the same name, R's t

Re: [R] viewing data in something similar to 'R Data Editor'

2008-08-01 Thread Jim Porzak
Rachel, You may want to try JGR, http://jgr.markushelbig.org/JGR.html which has, among many nice IDE features, an object browser that will do what you want. HTH, Jim Porzak Responsys, Inc. San Francisco, CA http://www.linkedin.com/in/jimporzak useR Group SF: http://ia.meetup.com/67/ On Fri,

Re: [R] source a script file straight from a subversion repository

2008-08-01 Thread Marc Schwartz
on 08/01/2008 06:49 PM Steven McKinney wrote: Hi useRs I'm trying to figure out how to source an R script file straight from a subversion repository, without having to put a copy of the script into the local working directory. Has anyone done this? Something such as source(file = paste(

Re: [R] source a script file straight from a subversion repository

2008-08-01 Thread Duncan Murdoch
On 01/08/2008 7:49 PM, Steven McKinney wrote: Hi useRs I'm trying to figure out how to source an R script file straight from a subversion repository, without having to put a copy of the script into the local working directory. Has anyone done this? Something such as source(file = paste(

[R] source a script file straight from a subversion repository

2008-08-01 Thread Steven McKinney
Hi useRs I'm trying to figure out how to source an R script file straight from a subversion repository, without having to put a copy of the script into the local working directory. Has anyone done this? Something such as source(file = paste("svn://myrepo.xxx.org/opt/svn/repos/",

Re: [R] R CMD INSTALL error, R-2.7.1

2008-08-01 Thread Duncan Murdoch
On 01/08/2008 5:50 PM, Richard Chandler wrote: After poking around some more I found the problem. The shortcut name in PATH should be c:\progra~1\htmlhe~1 instead of c:\progra~1\htmhe~1. Don't know how that happened, but thanks for pointing me in the right direction. The Windows path can handle

Re: [R] R CMD INSTALL error, R-2.7.1

2008-08-01 Thread Richard Chandler
After poking around some more I found the problem. The shortcut name in PATH should be c:\progra~1\htmlhe~1 instead of c:\progra~1\htmhe~1. Don't know how that happened, but thanks for pointing me in the right direction. Richard Quoting Duncan Murdoch <[EMAIL PROTECTED]>: > On 8/1/2008 12:39 PM,

Re: [R] R CMD INSTALL error, R-2.7.1

2008-08-01 Thread Richard Chandler
Thanks for the reply, but I'm still having trouble. The PATH appears correct: c:\Rtools\bin;c:\Rtools\perl\bin;c:\Rtools\MinGW\bin;c:\progra~1\R\R-2.7.1\bin;c:\progra~1\miktex~1.7\miktex\bin;c:\progra~1\htmhe~1;c:\windows;c:\windows\system32;C:\Program Files\QuickTime\QTSystem;C:\ArcGIS\arcexe9x\b

Re: [R] Legend outside plot => grid not limited to plot

2008-08-01 Thread Prof Brian Ripley
On Fri, 1 Aug 2008, Peter Mueller wrote: Hi dear R users, i would like to have: 1. the legend outside of the plot and 2. add a grid to the plot. For 1. I found a example in the R mailinglist archive [1]. 1: http://tolstoy.newcastle.edu.au/R/help/06/01/19423.html The total example code would be

[R] Properly Parsing Pre-Superscripts & Displaying Them With grid.text

2008-08-01 Thread Bryan Hanson
Hi all... I¹m making a chart dealing with frequencies of isotopes of various elements. For instance, I'd like the following text to appear on a chart with the "35" and "37" as superscripts: Based upon: 35Cl: 75% 37Cl: 25% I am having problems properly parsing the superscript that preceeds the "C

[R] boxplot help

2008-08-01 Thread Rajasekaramya
hi I have list of matrix of lenggth 61 containg the mean values..I want to make a boxplot for each of the matrix. I used a for loop but i cant figure out the way to save in the boxplots > all.the.mean [[1]] mean 0.5 o.6 0.8 [[2]] 0.6 0.6 0.9 now i want the boxplot for each of the matrix in a se

[R] Legend outside plot => grid not limited to plot

2008-08-01 Thread Peter Mueller
Hi dear R users, i would like to have: 1. the legend outside of the plot and 2. add a grid to the plot. For 1. I found a example in the R mailinglist archive [1]. 1: http://tolstoy.newcastle.edu.au/R/help/06/01/19423.html The total example code would be: > ?par > par(xpd=T, mar=par()$mar+c(0,0,

Re: [R] [R-sig-ME] Major difference in the outcome between SPSS and R statisticalprograms

2008-08-01 Thread Douglas Bates
On Fri, Aug 1, 2008 at 10:56 AM, Doran, Harold <[EMAIL PROTECTED]> wrote: > First off, Marc Schwartz posted this link earlier today, read it. > > http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-di > splayed-when-using-lmer_0028_0029_003f > > Second, your email is not really de

Re: [R] correlation between rows of data.frame

2008-08-01 Thread Christos Hatzis
Eleni, A way to do this is to group the data first using 'split' and then sapply the dist function to this list. The slower step will be the split which took a couple of minutes on my laptop but sapply should not take more than a minute or so. size <- 1 df <- data.frame( id=rep(sample

Re: [R] Memory Problems with a Simple Bootstrap

2008-08-01 Thread Tom La Bone
Here it is with the gc() in a print statement. Tom > > library(boot) > setwd("C:/Documents and Settings/Tom/Desktop") > > data.in <- read.csv("inputdata.csv",header=T,as.is=T) > > per95 <- function( annual.data, b.index) { + sample.data <- annual.data[b.index,] + return(quantile(sample

[R] failing to load package in R 2.7.1 patched

2008-08-01 Thread Monica Pisica
Hi, yesterday i had the surprise not to be able to load the package "ca" on R 2.7.0 saying that cannot find required package rgl although it was there. So today i've upgraded to 7.2.1. patched and i got the following error: > local({pkg <- select.list(sort(.packages(all.available = TRUE))) +

[R] multinomRob: Error in eigen [..] infinite or missing values in 'x'

2008-08-01 Thread Alejandro Buren
I'm interested in analysing some of my data using multinomial regression. I have been using nnet's multinom so far. However, I found that some of the data shows overdispersion and hence want to change to robust multinomial regression, package: multinomRob I have succesfully implemented Agresti's (2

Re: [R] Memory Problems with a Simple Bootstrap

2008-08-01 Thread jim holtman
It seems like the objects are reasonable size and the memory size also seems reasonable. That is what I usually go by to see if there are large objects in my memory. If it was showing that R had 1.2GB of memory allocated to it, I wonder if there might be a memory leak somewhere. On Fri, Aug 1, 2

Re: [R] viewing data in something similar to 'R Data Editor'

2008-08-01 Thread Erik Iverson
Rachel Schwartz wrote: Thanks Erik, almost worked! I am a mac user and for some reason View worked perfectly for my PC using friend, but doesn't for me. When I tried: > mat=matrix(1:10,ncol=2) > mat [,1] [,2] [1,]16 [2,]27 [3,]38 [4,]49 [5,]5 10

Re: [R] R CMD INSTALL error, R-2.7.1

2008-08-01 Thread Duncan Murdoch
On 8/1/2008 12:39 PM, Richard Chandler wrote: Hi, I am getting the following error when using R CMD INSTALL ever since I upgraded to R-2.7.1: hhc: not found CHM compile failed: HTML Help Workshop not intalled? As indicated, the package is installed but without CHM help files. I have downloaded

[R] correlation between rows of data.frame

2008-08-01 Thread Eleni Rapsomaniki
Dear R users, I need to come up with an efficient method to compute the correlation (or at least, the euclidean distance if that's easier) between specific rows in a data frame (46,232 rows,29 columns). The pairs of rows between which I want to find the correlation share a common value in one

Re: [R] viewing data in something similar to 'R Data Editor'

2008-08-01 Thread Rachel Schwartz
Thanks Erik, almost worked! I am a mac user and for some reason View worked perfectly for my PC using friend, but doesn't for me. When I tried: > mat=matrix(1:10,ncol=2) > mat [,1] [,2] [1,]16 [2,]27 [3,]38 [4,]49 [5,]5 10 > View(mat) I get no error mes

[R] Distance measure for large sparse matrix

2008-08-01 Thread Messing, Solomon O.
Hello, I am trying to compute a distance measure for the rows (var1) in a sparse matrix: require(Matrix) dfx = xtabs(~ var1 + var2, data = df, sparse = T, drop.unused.levels = T ) dm = dist(dfx) on my data frame. Note that I am using the xtabs function from the Matrix package, not

Re: [R] how to replace NA values in a list

2008-08-01 Thread Roland Rau
Hi, to be honest, I never created a matrix of lists before, but hopefully this code will help you? set.seed(12345) my.pool <- c(NA, 0:10) n <- 25 alist <- list(sample(x=my.pool, size=n, replace=TRUE)) alist mymatrix <- matrix(rep(alist, 6*3), nrow=6) mymatrix2 <- lapply(X=mymatrix, FUN=funct

Re: [R] simple help request

2008-08-01 Thread Jorge Ivan Velez
Dear Lotta, Try my.df <- data.frame(a <- c(1,6,10,11,3,5,10), group <- c(5,5,5,5,9,9,9)) tapply(my.df$a,my.df$group,median) 5 9 8 5 See ?tapply and/or ?aggregate for more information. HTH, Jorge On Fri, Aug 1, 2008 at 1:30 PM, Lotta R <[EMAIL PROTECTED]> wrote: > Hi all, > > I have data t

[R] Confidence intervals with nls()

2008-08-01 Thread Ranney, Steven
I have data that looks like O.lengthO.age 176 1 179 1 182 1 ... 493 5 494 5 514 5 606 5 462 6 491 6 537 6 553 6 432 7 522 7 625 8 661 8 687 10 704 10 615 12 (truncated) with a simple VonB growth model from within nls(): plot

Re: [R] simple help request

2008-08-01 Thread John Kane
?aggregate Something like this should do it. aggregate(xx[,1], list(xx[,2], median) --- On Fri, 8/1/08, stephen sefick <[EMAIL PROTECTED]> wrote: > From: stephen sefick <[EMAIL PROTECTED]> > Subject: Re: [R] simple help request > To: "Lotta R" <[EMAIL PROTECTED]> > Cc: r-help@r-project.org >

[R] how to replace NA values in a list

2008-08-01 Thread Shang Liu
I have a matrix named "spec" (see below), it is a 6x3 matrix, and each element of spec is a list. For example, spec[1,"wavenumber"] is a list, and it contains 1876 numeric numbers and NAs. I want to replace the NAs to zero, but don't know how to change it, the difficulty may be all the elements

[R] match and as.character truncation

2008-08-01 Thread Eric Weese
I know the following is documented behaviour, in the sense that the help page for as.character mentions that it truncates at about 500 characters... but wouldn't it be better if there was a warning of some sort issued? Or am I misunderstanding what's happening here? > str <- sample(LETTER

Re: [R] simple help request

2008-08-01 Thread stephen sefick
# I am sure there is a better way than this a <- c(1,6,10,11,3,5,10) group <- c(5,5,5,5,9,9,9) my.df <- cbind(a,group) a.5 <- subset(my.df, group==5) median(a.5[,1]) a.9 <- subset(my.df, group==9) median(a.9[,1]) # MASS 4 is a good book On Fri, Aug 1, 2008 at 1:30 PM, Lotta R <[EMAIL PROTECTED]>

Re: [R] Reading data in R-metrics: FOLLOW UP

2008-08-01 Thread Kerpel, John
Apparently, the Fed changed the way they handled missing values in the interest rates files; now they use a period instead of #N/A like they did in my old files. When I do a global replace and replace the periods with a blank prior to importing in R, I get what I used to get: DTB3<-read.table("

Re: [R] Reading data in R-metrics

2008-08-01 Thread Patrick Burns
My suspicion is that there is some value that R does not think is numeric, so the column becomes a factor, and you are seeing the codes for the factor. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") Kerpel,

[R] Reading data in R-metrics

2008-08-01 Thread Kerpel, John
Hi Folks! I used the code below previously with no problems, but now I get: DTB3<-read.table("C:\\Program Files\\R\\R-2.7.1\\DTB3.csv",header=TRUE,sep=",") > tail(DTB3) DATE VALUE 14233 2008-07-23 1.56 14234 2008-07-24 1.62 14235 2008-07-25 1.71 14236 2008-07-28 1.70

Re: [R] History pruning

2008-08-01 Thread Richard M. Heiberger
I meant 5a 5b 5c. Multiple-line commands are handled correctly. What is is doing is looking for "> " and " +" prompts. Anything else is removed. Here is a selection from the *R* buffer and the result after cleaning. It includes an example of par(). Rich *R* > options(chmhelp = FALSE) > option

Re: [R] History pruning

2008-08-01 Thread Ken Williams
On 8/1/08 12:40 PM, "Richard M. Heiberger" <[EMAIL PROTECTED]> wrote: > >> 5a) save my entire history to a text file >> 5b) open it up in Emacs >> 5c) prune any lines that don't have assignment operators > > No one has yet mentioned the obvious. ESS does your 5a 5b 5c with >M-x ess-transc

Re: [R] Coefficients of Logistic Regression from bootstrap - how to get them?

2008-08-01 Thread Michal Figurski
Dear all, Your constant talking about what bootstrap is and is not suitable for made me finally verify the findings in the Pawinski et al paper. Here is the procedure and the findings: - First of all I took the raw data (that was posted earlier on this list) and estimated the AUC values usin

Re: [R] How to get the p-value from lmer on a longitudinal analysis

2008-08-01 Thread Mark Difford
Hi Ronaldo, ... lmer p-values There are two packages that may help you with this and that might work with the current implementation of lmer(). They are languageR and RLRsim. HTH, Mark. Bugzilla from [EMAIL PROTECTED] wrote: > > Hi, > > I have a modelo like this: > > Yvar <- c(0, 0, 0, 0,

Re: [R] viewing data in something similar to 'R Data Editor'

2008-08-01 Thread Erik Iverson
See ?View but I don't think it 'auto updates' per your last sentence. Maybe there's a better option? Rachel Schwartz wrote: Hi, I would like to view matrices I am working with in a clean, easy to read, separate window. A friend showed me how to do something like I want with edit(). I can vie

[R] Eaxct position of specific elements in array

2008-08-01 Thread Ralph S.
Hi, I am trying to get the positions in array coordinates (needed later) of certain elements in an array but I am not sure how to get them. My array is Q and the condition is dt>dV, where dt and dV are arrays of exactly the same dimensions as Q. I know that I can extract the elements of Q by

Re: [R] History pruning

2008-08-01 Thread Richard M. Heiberger
>5a) save my entire history to a text file >5b) open it up in Emacs >5c) prune any lines that don't have assignment operators > > >Ken Williams >Research Scientist >The Thomson Reuters Corporation >Eagan, MN No one has yet mentioned the obvious. ESS does your 5a 5b 5c with M-x ess-transcript

[R] viewing data in something similar to 'R Data Editor'

2008-08-01 Thread Rachel Schwartz
Hi, I would like to view matrices I am working with in a clean, easy to read, separate window. A friend showed me how to do something like I want with edit(). I can view the matrix in the 'R Data Editor': For a sample matrix: > mat=matrix(1:15,ncol=3) > mat [,1] [,2] [,3] [1,]16

[R] simple help request

2008-08-01 Thread Lotta R
Hi all, I have data that looks like number|grouping I would like to preform stats for each grouping so 1|5 6|5 10|5 11|5 3|9 5|9 10|9 Say I would like to take the median for above, I should be returned 2 lines, one for group #5 and one for group #9 Does this make sense? I am sorry for the

Re: [R] Memory Problems with a Simple Bootstrap

2008-08-01 Thread Tom La Bone
Same problem. The Windows Task Manager indicated that Rgui.exe was using 1,249,722 K of memory when the error occurred. This is R 2.7.1 by the way. > library(boot) > setwd("C:/Documents and Settings/Tom/Desktop") > > data.in <- read.csv("inputdata.csv",header=T,as.is=T) > > per95 <- function

Re: [R] nested calls, variable scope

2008-08-01 Thread Jacob Wegelin
Dear Bert: Thank you for your reply. But the "eval.parent" function does not seem to solve the problem. Below is the code. I have tried running it with eval.parent(myknot) as well as with integers from 0 through 4, as in eval.parent(myknot, 4) Each attempt produces the same error: Error in ev

Re: [R] How to get the p-value from lmer on a longitudinal analysis

2008-08-01 Thread Ronaldo Reis Junior
Em Sex 01 Ago 2008, Marc Schwartz escreveu: > on 08/01/2008 10:11 AM Ronaldo Reis Junior wrote: > > Hi, > > > > I have a modelo like this: > > > > Yvar <- c(0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 1, 2, 3, 6, 6, 3, 3, 4) > > TIME <- 4:22 > > ID <- rep("PlotA",19) > > m <- lmer(Yvar~TIME+(TIME|ID),family=p

Re: [R] Exporting data to a text file

2008-08-01 Thread John Kane
try str(myclara) to see what you have - a data frame , matrix etc Are you getting any error messages? I tried your write.table commands and they work okay. --- On Fri, 8/1/08, pacomet <[EMAIL PROTECTED]> wrote: > From: pacomet <[EMAIL PROTECTED]> > Subject: [R] Exporting data to a text file >

Re: [R] chron objects: input/output

2008-08-01 Thread Gabor Grothendieck
Just recently the ability to handle POSIXt style formats in as.chron was added: > x <- c("07/01/2001 12:00:00","07/17/2001 15:00:00") > y <- as.chron(x, "%m/%d/%Y %H:%M:%S") > y [1] (07/01/01 12:00:00) (07/17/01 15:00:00) > # Here is a workaround > format(as.POSIXct(y), tz = "GMT", format = "%m

Re: [R] Plotting ordered nominal data

2008-08-01 Thread John Kane
I'm not really clear on what you want here. Are you talking about plotting multiple data points for each value ? In that case something like boxplot might be what you want. Otherwise if you just wish to plot a data point for each occurance of Normal etc then this will work but I'm not sure h

[R] R CMD INSTALL error, R-2.7.1

2008-08-01 Thread Richard Chandler
Hi, I am getting the following error when using R CMD INSTALL ever since I upgraded to R-2.7.1: hhc: not found CHM compile failed: HTML Help Workshop not intalled? As indicated, the package is installed but without CHM help files. I have downloaded the latest version of Rtools and I have tried u

[R] graph

2008-08-01 Thread elyakhlifi mustapha
Hello.   I don't know how to do to ouput segments between points like the chart attached. Can you help me please? Thanks. .yahoo.fr__ R-help@r-project.org mailing list h

[R] graph

2008-08-01 Thread elyakhlifi mustapha
Hello. I don't know how to do to ouput segments between points like the chart attached. Can you help me please? Thanks. _ Envo__ R-help@r-project.org mailing list https:

[R] Smartest way to evaluate question forms

2008-08-01 Thread vlasto
Hi, I'm trying to help a friend who is doing a thesis in a nurse college, to evaluate medical question forms. There are about 30 questions giving more than 110 parameters to describe each responding person's (gender, health etc.) and there are about 120 question forms to evaluate. I have basically

Re: [R] Memory Problems with a Simple Bootstrap

2008-08-01 Thread jim holtman
Use gc() in the loop to possibly free up any fragmented memory. You might also print out the size of B (object.size(B)) since that appears to be the only variable in your loop that might be growing. On Fri, Aug 1, 2008 at 12:09 PM, Tom La Bone <[EMAIL PROTECTED]> wrote: > > > I have a data file c

Re: [R] Plotting ordered nominal data

2008-08-01 Thread Marc Schwartz
on 08/01/2008 10:21 AM Sandy Small wrote: Hi I'm sure this question has been asked before but I can't find it in the archives. I have a data frame which includes interval and ordered nominal results. It looks something like "Measured" "Eyeball" 46.5 Normal 43.5 Mild 56.2 Normal 41.

[R] Exporting data to a text file

2008-08-01 Thread pacomet
HI R users With clara function I get a data frame (maybe this is not the exact word, I'm new to R) with the following variables: > names(myclara) [1] "sample" "medoids""i.med" "clustering" "objective" [6] "clusinfo" "diss" "call" "silinfo""data" I want to export

Re: [R] Plotting ordered nominal data

2008-08-01 Thread S Ellison
Sandy, You can re-order a factor with df$Eyeball<-factor(df$Eyeball, levels=c("Normal", "Mild", "Moderate", "Severe"), ordered=T) (assuming df is your data frame and that you want an _ordered_ factor; the latter is not essential to your plots) Incidentally, "NULL" isn't a particularly friendly

Re: [R] Best way to select good points in a noisy signal ?

2008-08-01 Thread John Kane
I'm not quite sure if this is what you mean but have a look at ?lowess or ?smooth. I think you might get want you want if you play around with the parameters in lowess --- On Fri, 8/1/08, Ptit_Bleu <[EMAIL PROTECTED]> wrote: > From: Ptit_Bleu <[EMAIL PROTECTED]> > Subject: [R] Best way to s

[R] standardize ggplot and lattice themes

2008-08-01 Thread baptiste auguie
Dear list, I'm writing a long document (thesis) and as much as I would like to use only ggplot2 for the graphics, some features are still a bit undocumented so I often end up choosing either ggplot2, lattice, or base plots (which i know better) depending on the particular graph to produc

Re: [R] bug in readRAST6 function in package spgrass6

2008-08-01 Thread Roger Bivand
On Fri, 1 Aug 2008, Rainer M Krug wrote: Hi if I try to import a raster layer which consists only of NULL values from grass by using the readRAST6, I get an error message: readRAST6("HSericea_seedsDisperse_2007") ERROR: Invalid value for null (integers only) Error in readBinGrid(rtmpfl11,

[R] Memory Problems with a Simple Bootstrap

2008-08-01 Thread Tom La Bone
I have a data file called inputdata.csv that looks something like this" ID YearResult Month Date 1 71741954 103 540301 2 7174195443 540322 3 20924 1967 4 2 670223 4 20924

Re: [R] bug in readRAST6 function in package spgrass6

2008-08-01 Thread Rainer M Krug
On Fri, Aug 1, 2008 at 6:03 PM, Roger Bivand <[EMAIL PROTECTED]> wrote: > On Fri, 1 Aug 2008, Rainer M Krug wrote: > >> Hi >> >> if I try to import a raster layer which consists only of NULL values >> from grass by using the readRAST6, I get an error message: >> >> >>> readRAST6("HSericea_seedsDis

Re: [R] Major difference in the outcome between SPSS and R statisticalprograms

2008-08-01 Thread Doran, Harold
First off, Marc Schwartz posted this link earlier today, read it. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-di splayed-when-using-lmer_0028_0029_003f Second, your email is not really descriptive enough. I have no idea what OR is, so I have no reaction. Third, you're

Re: [R] drop1() seems to give unexpected results compare to anova()

2008-08-01 Thread Jeroen Ooms
Thomas Chu wrote: > > Neither of those 3 lines of commands managed to drop x4 and its P value > magically decreased from 0.94 to almost 0! I am also baffled by how R > calculated those RSS. > Maybe it is using a different type of SS. If i have a lm() model, and i do: options(contrasts=c("con

Re: [R] creating image using RGB values

2008-08-01 Thread Roland Rau
Hi Rostam, did you check ?rgb already? Hope this helps, Roland rostam shahname wrote: Hi R users, I would like to create an image using three matrices which contain the values of Red, Green, and Blue of each pixel, i.e. one matrix which has values of red, one which has values of green, and on

[R] bug in readRAST6 function in package spgrass6

2008-08-01 Thread Rainer M Krug
Hi if I try to import a raster layer which consists only of NULL values from grass by using the readRAST6, I get an error message: > readRAST6("HSericea_seedsDisperse_2007") ERROR: Invalid value for null (integers only) Error in readBinGrid(rtmpfl11, colname = vname[i], proj4string = p4, intege

[R] creating image using RGB values

2008-08-01 Thread rostam shahname
Hi R users, I would like to create an image using three matrices which contain the values of Red, Green, and Blue of each pixel, i.e. one matrix which has values of red, one which has values of green, and one which has values of blue. The values are between 0 and 1 instead of 0-255. I have obtained

Re: [R] Major difference in the outcome between SPSS and R statisticalprograms

2008-08-01 Thread Doran, Harold
The biggest problem is that SPSS cannot fit a generalized linear mixed model but lmer does. So, why would you expect the GLM in SPSS and the GLMM in lmer to match anyhow? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Draga, R. > Sent: Friday, Aug

[R] Unexpected nls behaviour

2008-08-01 Thread Keith Jewell
Hi everyone, I thought that for a selfStart function, these two should be exactly equivalent > nls(Aform, DF) > nls(Aform, DF, start=getInitial(Aform, DF)) but in this example that is not the case in R (although it is in S-plus V6.2) -- SSbatch<-selfStart( model=funct

[R] Plotting ordered nominal data

2008-08-01 Thread Sandy Small
Hi I'm sure this question has been asked before but I can't find it in the archives. I have a data frame which includes interval and ordered nominal results. It looks something like "Measured" "Eyeball" 46.5 Normal 43.5 Mild 56.2 Normal 41.1 Mild 37.8 Moderate 12.6 Severe 17.3

Re: [R] How to get the p-value from lmer on a longitudinal analysis

2008-08-01 Thread Marc Schwartz
on 08/01/2008 10:11 AM Ronaldo Reis Junior wrote: Hi, I have a modelo like this: Yvar <- c(0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 1, 2, 3, 6, 6, 3, 3, 4) TIME <- 4:22 ID <- rep("PlotA",19) m <- lmer(Yvar~TIME+(TIME|ID),family=poisson) anova(m) summary(m) How to get the p-value for this case? Thanks

[R] How to get the p-value from lmer on a longitudinal analysis

2008-08-01 Thread Ronaldo Reis Junior
Hi, I have a modelo like this: Yvar <- c(0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 1, 2, 3, 6, 6, 3, 3, 4) TIME <- 4:22 ID <- rep("PlotA",19) m <- lmer(Yvar~TIME+(TIME|ID),family=poisson) anova(m) summary(m) How to get the p-value for this case? Thanks Ronaldo -- Just because you're paranoid doesn't me

Re: [R] allocMatrix limits

2008-08-01 Thread Martin Maechler
> "VK" == Vadim Kutsyy <[EMAIL PROTECTED]> > on Fri, 01 Aug 2008 07:35:01 -0700 writes: VK> Martin Maechler wrote: >> VK> The problem is in array.c, where allocMatrix check for VK> "if ((double)nrow * (double)ncol > INT_MAX)". But why VK> itn is used and not long

Re: [R] parent in Creating environment object

2008-08-01 Thread Duncan Murdoch
On 8/1/2008 9:46 AM, Benjamin Otto wrote: Hi, I would like to convert a simple list into an environment object. It seems I have to create an environment object with new.env() and assign the single values afterwards. Now what I did not really understand from the guides until now is, how the paren

[R] RE : bwplot with Date object

2008-08-01 Thread GOUACHE David
I ended up finding one solution to my 2nd question. Here it is : http://tolstoy.newcastle.edu.au/R/help/04/01/0649.html Sorry for the bother. David De: GOUACHE David Date: ven. 01/08/2008 15:50 À: Deepayan Sarkar Cc: [EMAIL PROTECTED] Objet : RE : [R] bwplot

[R] parent in Creating environment object

2008-08-01 Thread Benjamin Otto
Hi, I would like to convert a simple list into an environment object. It seems I have to create an environment object with new.env() and assign the single values afterwards. Now what I did not really understand from the guides until now is, how the parent environment supplied to the new.env() func

Re: [R] allocMatrix limits

2008-08-01 Thread Vadim Kutsyy
Martin Maechler wrote: VK> The problem is in array.c, where allocMatrix check for VK> "if ((double)nrow * (double)ncol > INT_MAX)". But why VK> itn is used and not long int for indexing? (max int is VK> 2147483647, max long int is 9223372036854775807) Well, Brian gave you all i

[R] Diffusion maps and isomaps

2008-08-01 Thread t . peter . Mueller
Hi, I was just woundering if there is in R a stable package for: - Diffusion maps [1] - Isomaps [2] 1: http://www.cs.tau.ac.il/~shekler/Seminar2007a/DM%20GH%20and%20App/dm_elsevier.pdf 2: http://isomap.stanford.edu/ Thanks Peter -- http://games.entertainment.gmx.net/de/entertainment/games/fr

[R] Major difference in the outcome between SPSS and R statistical programs

2008-08-01 Thread Draga, R.
Dear collegues, I have used R statistical program, package 'lmer', several times already. I never encountered major differences in the outcome between SPSS and R. ...untill my last analyses. Would some know were the huge differences come from. Thanks in advance, Ronald In SPSS the Pearson c

Re: [R] Is R's fast fourier transform function different from "fft2" in Matlab?

2008-08-01 Thread stephen sefick
Yep you are totally right. I looked at the graphs to do the analysis quickly, and sacrificed correctness. z <- rnorm(5000) z.ts <- ts(z) f <- fft(z.ts) d <- fft(f, inverse=T) plot(z.ts, d/5000) #this is how far off the algorithm was from recreating the series. After it is divided by the signal le

Re: [R] drop1() seems to give unexpected results compare to anova()

2008-08-01 Thread Thomas P C Chu
Interestingly, if I fitted the model using glm() rather than lm(), drop1() would behave as expected: summary(model.glm <- glm(y ~ ., data = sim.set, family = 'gaussian')) summary(model.lm <- lm(y ~ ., data = sim.set)) drop1(model.glm, test = 'F') drop1(model.lm, test = 'F') model.glm <- step(mod

Re: [R] 'system' command through Rserve

2008-08-01 Thread Patil, Prasad
Hi Jeff, You are absolutely right. In all the mess, I forgot that my Rserve was started by a different user! Sometimes it's the simplest solution, isn't it? Thanks a lot. -Prasad -Original Message- From: Jeffrey Horner [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 5:14 PM To:

[R] RE : bwplot with Date object

2008-08-01 Thread GOUACHE David
Hello and thank you for your reply. My dummy example was a bit too simple... I'm having difficulty correctly specifying the 'at' component since my real situation concerns a multipanel display with ' relation="free" '. To illustrate : dates<-as.Date(32768:32895,origin="1900-01-01") plouf<-dat

Re: [R] Solving Yis[i] = a*cos((2*pi/T)*(times[i] - Tau)) + ...

2008-08-01 Thread Hans W. Borchers
Treat it as an over-determined linear system, that is: A <- cbind(cos((2*pi/T)*(Times - Tau)), sin((2*pi/T)*(Times - Tau))) qr.solve(A, Yis) because 'solve' will only handle square matrices. Hans W. Borchers Josué Polanco wrote: > > Hi everybody, > > I am reading the Lomb paper

[R] chron objects: input/output

2008-08-01 Thread Stephen Tucker
Hi list, I have some questions regarding 1) conversion of date + time characters to chron 2) formatting chron object printing Regarding (1), Gabor's Rnews 2004 4/1 article has been indispensible, but I often work with files where dates and times are contained in a single field. In this case, I wo

Re: [R] allocMatrix limits

2008-08-01 Thread Martin Maechler
> "VK" == Vadim Kutsyy <[EMAIL PROTECTED]> > on Thu, 31 Jul 2008 15:43:56 -0700 writes: >>> I am getting an error "allocMatrix: too many elements >>> specified" when I am trying to create large matrix or >>> vector (about 1 billion elements). >>> >>> How can I find

Re: [R] Newbie question: How to use tapply() on several vectorssimultaneously

2008-08-01 Thread ONKELINX, Thierry
Another option is ?by test <- as.data.frame(cbind(c(rep(1,5),rep(2,5)), rnorm(10), rnorm(10))) names(test)[1] <- "groupID" test$groupID <- factor(test$groupID) by(test[, -1], test$groupID, mean) HTH, Thierry ir. Thie

[R] Best way to select good points in a noisy signal ?

2008-08-01 Thread Ptit_Bleu
Hello, When I plot y=f(x) from the file xy.txt ( http://www.nabble.com/file/p18773387/xy.txt xy.txt ), I can clearly see a trend. Is there a function or a package able to take the median value of y for an interval of x (x +/- a defined value) to plot nice graph (at least a better one) ? Thanks

Re: [R] Newbie question: How to use tapply() on several vectors simultaneously

2008-08-01 Thread Dimitris Rizopoulos
one option is aggregate(), e.g., test <- as.data.frame(cbind(c(rep(1,5),rep(2,5)), rnorm(10), rnorm(10))) names(test)[1] <- "groupID" aggregate(test[c("V2", "V3")], list(test$groupID), mean) I hope it helps. Best, Dimitris -- Dimitris Rizopoulos Biostatistical Centre School of Public Health C

Re: [R] Newbie question: How to use tapply() on several vectors simultaneously

2008-08-01 Thread Stephan Kolassa
Hi Bertolt, by(test,INDICES=test$groupID,FUN=mean) And today's a holiday in Switzerland, so stop working already ;-) HTH Stephan Bertolt Meyer schrieb: Dear R users, I have a newbie-question that I couldn't resolve after reading through several pieces of documentation and searching the ar

Re: [R] Newbie question: How to use tapply() on several vectors simultaneously

2008-08-01 Thread David Hajage
something like that should work : aggregate(test, list(test[,1]), mean) 2008/8/1 Bertolt Meyer <[EMAIL PROTECTED]> > Dear R users, > > I have a newbie-question that I couldn't resolve after reading through > several pieces of documentation and searching the archive. > > I have a data.frame cont

[R] Newbie question: How to use tapply() on several vectors simultaneously

2008-08-01 Thread Bertolt Meyer
Dear R users, I have a newbie-question that I couldn't resolve after reading through several pieces of documentation and searching the archive. I have a data.frame containing experimental data from a group experiment in psychology. Each line represents a single participant, but participants

Re: [R] Extract Element of String with R's Regex

2008-08-01 Thread Gabor Grothendieck
On Fri, Aug 1, 2008 at 7:31 AM, Stephen Tucker <[EMAIL PROTECTED]> wrote: > In the example below, a straight application of strsplit() is probably the > simplest solution. In a more general case where it may be desirable to match > patterns, a combination of sub() or gsub() with strsplit() might

  1   2   >