[R] Parallelizing cor() for large data-set using Cluster

2011-01-28 Thread kparamas
Hi, I am running my code in a cluster at Arizona State University. I have a huge climate data, 66000 X 500 I am not sure if I can find correlation of such a huge data in the cluster. Normally I allocate 2M and operate on 5 X 2. Even this is taking lot of time. Is there any way I can fi

[R] Problem in weighting standard deviations

2011-01-28 Thread Fernando Lima
Dear all, I have a problem that has been driving me nuts. I have searched everywhere but could not find a comprehensive answer. I only get (sometimes contradictory) bits of information. I have a series of measurements with associated standard deviations, e.g: means +/- sd 10 +/- 0.2 13 +/- 0.4 0

[R] Regularization of a matrix that has some tiny negative eigenvalues

2011-01-28 Thread Dimitri Liakhovitski
Dear all: In what I am doing I sometimes get a (Hessian) matrix that has a couple of tiny negative eigenvalues (e.g. -6 * 10^-17). So, I can't run a Cholesky decomp on it - but I need to. Is there an established way to regularize my (Hessian) matrix (e.g., via some transformation) that would allow

Re: [R] User error in calling predict/model.frame

2011-01-28 Thread Joshua Wiley
Dear Russell, On Fri, Jan 28, 2011 at 5:59 PM, Russell Pierce wrote: > Ista & r-help list, > > I guess I left out the most important part of any question, my reason > for doing this.  I am interested in the predicted y value at the mean, > 1 SD above of the mean, and 1 SD below the mean for each

Re: [R] Mean from confidence intervals

2011-01-28 Thread Joshua Wiley
Hi Peter, Do you know the formula used to calculate the confidence interval? I suspect it is possible with minimal algebraic manipulation of the CI formula to find what the mean is. Assuming a normal distribution (as David), then it is certainly possible to find. This wikipedia page might help:

Re: [R] User error in calling predict/model.frame

2011-01-28 Thread Russell Pierce
Ista & r-help list, I guess I left out the most important part of any question, my reason for doing this. I am interested in the predicted y value at the mean, 1 SD above of the mean, and 1 SD below the mean for each predictor. Since I conducted my analysis with my IVs in the scale of Z (i.e. my

Re: [R] Problems replacing empty cells with NA values

2011-01-28 Thread jim holtman
Do 'str(data)' to see what the structure of the data is. Are the columns with character or factors? Is this what you are seeing: > x <- read.table(textConnection('123 456 a + NA 1 b + 2 NA c + 3 4 NA + 3 2 1')) > closeAllConnections() > x V1 V2 V3 1 123 456a 2 NA 1b 3 2 NA

Re: [R] User error in calling predict/model.frame

2011-01-28 Thread Ista Zahn
On Fri, Jan 28, 2011 at 6:26 PM, Russell Pierce wrote: > Thanks for your response Ista, > I'm looking at the results in newdata following your command.  I agree that > predict ran, but I don't think it did what I expect it to do. I may be > mistaken, but shouldn't the mean of dat$out be close to t

Re: [R] Mean from confidence intervals

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 5:15 PM, Peter Francis wrote: Dear List, I am not sure if A) this is possible or B) the correct place to ask. I am looking to find the mean - i have n, and the two-tailed confidence intervals 0.95 & 0.25 with a p-value of 0.05. Can i find the mean from this data ? I

Re: [R] any similiar R fuction for matlab function 'fprintf'?

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 6:23 PM, Zunqiu Chen wrote: Dear All, Currently, I am translating Matlab code to R. I met difficulties to translate such Matlab codes into R: fprintf(fid,(' SPLITTING RESULTS ')); fprintf(fid,(' \n')); fprintf(fid,' Data base to analyze is a matrix %4i x %2i ',[n m]); fp

Re: [R] User error in calling predict/model.frame

2011-01-28 Thread Russell Pierce
Thanks for your response Ista, I'm looking at the results in newdata following your command. I agree that predict ran, but I don't think it did what I expect it to do. I may be mistaken, but shouldn't the mean of dat$out be close to the mean of newdata$Y? Shouldn't the values in newdata$Y (assum

Re: [R] Help with ape - read.GenBank()

2011-01-28 Thread James Meadow
Thanks, Ben! That worked. I will join r-sig-phylo, I didn't know it was there. James On Fri, Jan 28, 2011 at 1:46 PM, Ben Bolker wrote: > James Meadow gmail.com> writes: > > > > > Hi, > > > > I am trying to work with the ape package, and there is one thing I am > > struggling with. When cal

[R] Mean from confidence intervals

2011-01-28 Thread Peter Francis
Dear List, I am not sure if A) this is possible or B) the correct place to ask. I am looking to find the mean - i have n, and the two-tailed confidence intervals 0.95 & 0.25 with a p-value of 0.05. Can i find the mean from this data ? Thanks Peter ___

[R] any similiar R fuction for matlab function 'fprintf'?

2011-01-28 Thread Zunqiu Chen
Dear All, Currently, I am translating Matlab code to R. I met difficulties to translate such Matlab codes into R: fprintf(fid,(' SPLITTING RESULTS ')); fprintf(fid,(' \n')); fprintf(fid,' Data base to analyze is a matrix %4i x %2i ',[n m]); fprintf(fid,' \n'); fprintf(fid,' h is %2i',h); fprintf(

[R] arules package question- apriori/S4 object export question

2011-01-28 Thread johnistan
I am new to R( but quickly being awed by the range of this it can accomplish, you have one more convert to the useR universe). I have successfully implemented the apriori function and are getting great results. My question concerns how to export these results. I have read lots about write.csv func

Re: [R] User error in calling predict/model.frame

2011-01-28 Thread Ista Zahn
Hi Russell, There may be some subtleties that I'm not picking up on, but the obvious problem is that the names of the predictors in newdata do not match the names of the predictors in dat. names(newdata) <- names(dat)[1:2] newdata$Y <- predict(lm.obj,newdata) does work on my machine. Best, Is

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Greg Snow
This would be easier if you showed us a sample of your data and what commands you are using. Without we need to guess. Probably your month variable is being turned into a factor somewhere and the default for factors is alphabetical. The best solution depends on how/where/when your months are

Re: [R] Plot 1:1 relationship

2011-01-28 Thread Greg Snow
In addition you may want to include asp=1 and pty='s' to the plot command. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org]

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread RICHARD M. HEIBERGER
You need to make your variable into a factor and specify the order. > mymonths <- c("December", "March") > factor(mymonths) [1] December March Levels: December March > factor(mymonths, levels=month.name) [1] December March 12 Levels: January February March April May June July August September Octo

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 4:53 PM, kurt_h...@nps.gov wrote: Greetings Though I have months in chronological order in my data table, the data were sampled every other month (i.e., February, April, June, August, October, December), every time I try to plot them (on the x-axis) they are plotte

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Don McKenzie
Kurt You need to give us more information if you want good advice. For example, what sort of plot are you trying to make? A barplot? A time series? A reproducible example is always best. Please see the R-news posting guide for hints on a successful query. On Jan 28, 2011, at 1:53 PM, kur

[R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Kurt_Helf
Greetings Though I have months in chronological order in my data table, the data were sampled every other month (i.e., February, April, June, August, October, December), every time I try to plot them (on the x-axis) they are plotted in alphabetical order. What am I missing? Cheers Kurt

[R] User error in calling predict/model.frame

2011-01-28 Thread Russell Pierce
I want to predict values from an existing lm (linear model, e.g. lm.obj) result in R using a new set of predictor variables (e.g. newdata). However, it seems that because my linear models was made by calling scale() on the target predictor that predict exits with an error, "Error in scale(xxA, cen

Re: [R] survreg 3-way interaction

2011-01-28 Thread tdenes
The fire devoured my laptop, but the PC is still working... :) Sorry for the lazyness, you are totally right. Here goes a reproducible example, which resembles the main features of our dataset: # three experimental factors, 30 subjects expgrid <- expand.grid(F1=0:1,F2=0:1,F3=0:1,id=1:30) # set

Re: [R] Meaning of pterms in survreg object?

2011-01-28 Thread Johannes Huesing
Johannes Huesing [Mon, Jan 10, 2011 at 09:26:37PM CET]: > I am trying to model survival data with a Weibull distribution > > using survreg. Units are clustered two apiece, sometimes receiving >

Re: [R] R-/Text-editor for Windows?

2011-01-28 Thread Tobias Verbeke
Hi Sascha, On 01/28/2011 07:55 PM, Sascha Vieweg wrote: Tinn-R (http://www.sciviews.org/Tinn-R/) is one of the topmost suggestions when googling an R-(text-)editor for Windows. However, to me it appears dissappointing that Tinn-R does not handle utf-8 (mac-roman, or any other) encoded R-scripts

Re: [R] Help with ape - read.GenBank()

2011-01-28 Thread Ben Bolker
James Meadow gmail.com> writes: > > Hi, > > I am trying to work with the ape package, and there is one thing I am > struggling with. When calling the *read.GenBank()* function, I can get it > to work with an object created like this: > > *>x <- c("AY395554","AY611035", ...)* > *>read.GenBank(

Re: [R] optim function multi variables -newbie

2011-01-28 Thread Hans W Borchers
michalseneca gmail.com> writes: > I tried to modify the code,thanks for noticing... > now i get that the function cannot be evaluated at initial parameters. > However I do not know what does that mean.. > Should I try to modify parameters. I am still not sure of syntax of > function. I cannot get

Re: [R] Plotting accumulated data

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 3:07 PM, Ottar Kvindesland wrote: Hello all I have the data frame with this: ID DATETIME TRN TRN_S 1 1192756 2010-06-23 15:39:07 13.420 0.2236667 2 1192757 2010-06-23 15:40:07 13.805 0.2300833 3 1192758 2010-06-23 15:41:07 13.860 0.231

Re: [R] R-/Text-editor for Windows?

2011-01-28 Thread Jonathan P Daily
Notepad ++ handles just about anything and has an accompanying program NppToR to make passing scripts easier. Geany also handles a ton of filetypes, but lacks a direct interface to R in the windows version - I wrote an AutoHotKey script that did this for me in about 5 minutes. On the other hand

[R] Paired data survival analysis, part 2

2011-01-28 Thread David L Lorenz
I'm curious. I've used the paired-prentice Wilcoxon test for the analysis of parried survival data. I haven't run into use of the coxph for that previously, but I have seen it referenced a couple of times in recent web searches. I have a data set of subjects like this: SubjectT1 R1 T2 R

[R] Plotting accumulated data

2011-01-28 Thread Ottar Kvindesland
Hello all I have the data frame with this: ID DATETIME TRN TRN_S 1 1192756 2010-06-23 15:39:07 13.420 0.2236667 2 1192757 2010-06-23 15:40:07 13.805 0.2300833 3 1192758 2010-06-23 15:41:07 13.860 0.231 4 1192759 2010-06-23 15:42:07 13.750 0.2291667 5 1192760

Re: [R] how to get coefficient and scores of Principal component analysis in R?

2011-01-28 Thread Liviu Andronic
Hello On Fri, Jan 28, 2011 at 8:16 PM, Zunqiu Chen wrote: > It might be a simple question. But I could not find the answer from function > “prcomp” or “princomp”. Does anyone know what are the codes to get > coefficient and scores of Principal component analysis in R? > Try these: https://stat.

Re: [R] R-/Text-editor for Windows?

2011-01-28 Thread Ista Zahn
I strongly suggest reconsidering your rejection of Emacs + ESS. However, if you cannot be persuaded of this, I hear WinEdit is pretty good. In case you haven't already found them, the following resources may be helpful: http://www.sciviews.org/_rgui/projects/Editors.html http://stackoverflow.com/

Re: [R] how to get coefficient and scores of Principal component analysis in R?

2011-01-28 Thread Sarah Goslee
By coefficients do you mean loadings? Anyway, if you read the help for princomp -- ?princomp -- will get that, you'll see that it says, in part: ‘princomp’ returns a list with class ‘"princomp"’ containing the following components: sdev: the standard deviations of the principal com

[R] mysterious error from foreach

2011-01-28 Thread Neil Best
On my first foray into foreach I am getting this error: Error in function (handle) : no function to return from, jumping to top level I get one of these for each worker. I am using the doMC/multicore back end. At first I thought this was caused by the text progress bars that the function

[R] how to get coefficient and scores of Principal component analysis in R?

2011-01-28 Thread Zunqiu Chen
Dear All, It might be a simple question. But I could not find the answer from function “prcomp” or “princomp”. Does anyone know what are the codes to get coefficient and scores of Principal component analysis in R? Your reply will be appreciated! Best Zunqiu [[alternative HTML

[R] Re : Re : ReferenceClasses examples {method}

2011-01-28 Thread Marc Carpentier
I hadn't found any message on this subject. Nevertheless you're right again : I've posted this report on r-devel-list where it obviously belongs... Marc - Message d'origine De : David Winsemius À : Marc Carpentier Cc : r-help@r-project.org Envoyé le : Ven 28 janvier 2011, 18h 59min

[R] R-/Text-editor for Windows?

2011-01-28 Thread Sascha Vieweg
Tinn-R (http://www.sciviews.org/Tinn-R/) is one of the topmost suggestions when googling an R-(text-)editor for Windows. However, to me it appears dissappointing that Tinn-R does not handle utf-8 (mac-roman, or any other) encoded R-scripts or, in general, text files. Besides Emacs and the R bui

Re: [R] Problems making subsets with [] or "subset"

2011-01-28 Thread Ista Zahn
Hi Mario, On Fri, Jan 28, 2011 at 12:27 PM, gaiarrido wrote: > > Hi, > I'm trying to make a model in order to know wich factors got´s influence in > the intensity of a infection, but just in the individuals who's got this > infection. In my data I've got a variable called "prevalence" with 2 leve

Re: [R] Re : ReferenceClasses examples {method}

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 12:35 PM, Marc Carpentier wrote: Right. Shame on me : Friday's tiredness ; I don't know why I stuck on that. Please just consider the main topic of my message, regarding the example of ReferenceClasses (supposing it's appropriate) and sorry for the subsequent question.

Re: [R] Plot 1:1 relationship

2011-01-28 Thread Sarah Goslee
abline() takes the intercept and slope, which for a 1:1 relationship are 0 and 1, respectively. So: abline(0, 1) Sarah On Fri, Jan 28, 2011 at 10:42 AM, Peter Francis wrote: > Dear list, > > I am looking to plot a line on a graph to show the 1:1 relationship, in order > to demonstrate the patte

[R] Re : ReferenceClasses examples {method}

2011-01-28 Thread Marc Carpentier
Right. Shame on me : Friday's tiredness ; I don't know why I stuck on that. Please just consider the main topic of my message, regarding the example of ReferenceClasses (supposing it's appropriate) and sorry for the subsequent question... - Message d'origine De : David Winsemius À :

[R] Problems replacing empty cells with NA values

2011-01-28 Thread Simone Santoro
Hi, I am preparing a quite huge database in Excel, I replaced the empty cells with "NA", I formatted it like text, and saved the file like a *.txt. After, in R: data<-read.table("myfile.txt",header=T,sep="\t") edit(data) When doing this I can see that some columns are OK and they have NA cells

[R] Problems making subsets with [] or "subset"

2011-01-28 Thread gaiarrido
Hi, I'm trying to make a model in order to know wich factors got´s influence in the intensity of a infection, but just in the individuals who's got this infection. In my data I've got a variable called "prevalence" with 2 levels: 1.- Infected individual 0.- Non infected So what i'm trying to do i

Re: [R] boxplot - code for labeling outliers - any suggestions for improvements?

2011-01-28 Thread Tal Galili
Hello Greg, Kevin, Jim and other R-help members, Regarding text spacing: Drew Conway published today a fascinating post about "Building a Better Word Cloud". I don't know if his function can help you (or if either of you might help him with his code). But either way, I think it's worth reading his

Re: [R] Odp: Letters(V1, V2..) as row col indices instead of numbers

2011-01-28 Thread Phil Spector
Suppose your correlation matrix is called cc. One way to do what you want is result = cbind(as.vector(row(cc)),as.vector(col(cc)),as.vector(cc)) result = result[result[,1] != result[,2],] - Phil Spector Statistical

Re: [R] Odp: Letters(V1, V2..) as row col indices instead of numbers

2011-01-28 Thread KumaraGuru
While listing it like that is it possible to remove the rows that has same row and col numbers? Like.. 1 1 x 2 2 x2 Regards, Kumaraguru On Jan 28, 2011, at 9:23 AM, Petr PIKAL wrote: > Hi > > KumaraGuru napsal dne 28.01.2011 17:03:50: > >> I want to melt the cor matrix and form a 3 c

[R] Plot 1:1 relationship

2011-01-28 Thread Peter Francis
Dear list, I am looking to plot a line on a graph to show the 1:1 relationship, in order to demonstrate the pattern i have observed is off the line, however i am unsure. I have tried abline but i can not see a function to plot the 1:1? Any help would be greatly appreciated #generate data y <-

Re: [R] Odp: Letters(V1, V2..) as row col indices instead of numbers

2011-01-28 Thread KumaraGuru
I want to melt the cor matrix and form a 3 col matrix with row# col# and cor. This I m using to draw a graph. Regards, Kumaraguru On Jan 28, 2011, at 6:47 AM, Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 28.01.2011 09:52:05: > >> >> What makes matrix to print V1, V2

Re: [R] read ODS (OOorg spreadsheet) files?

2011-01-28 Thread Sascha Vieweg
On 11-01-28 17:37, Sascha Vieweg wrote: I am wondering if there's any news about reading ODS files directly. ODS files are the spreadsheet files produced by OpenOffice.org. Currently, I export sheets in these files to csv files, one for each sheet. However, it would be much more convenient to

Re: [R] ReferenceClasses examples {method}

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 11:05 AM, Marc Carpentier wrote: Dear help, dear John Chambers, I'm trying to learn OOP-possibilities in R and I was going through the documentation 'ReferenceClasses {methods}'. (great work, by the way...) Reading associated Examples, something bothers me : it seems to me

[R] read ODS (OOorg spreadsheet) files?

2011-01-28 Thread Sascha Vieweg
I am wondering if there's any news about reading ODS files directly. ODS files are the spreadsheet files produced by OpenOffice.org. Currently, I export sheets in these files to csv files, one for each sheet. However, it would be much more convenient to read them directly. Thanks for hints and

Re: [R] Odp: Letters(V1, V2..) as row col indices instead of numbers

2011-01-28 Thread Petr PIKAL
Hi KumaraGuru napsal dne 28.01.2011 17:03:50: > I want to melt the cor matrix and form a 3 col matrix with row# col# and cor. Well, in that case it will be probably better to transform it to data frame and use melt. Or you can drop dimensions of this matrix and generate proper sequences of

[R] ReferenceClasses examples {method}

2011-01-28 Thread Marc Carpentier
Dear help, dear John Chambers, I'm trying to learn OOP-possibilities in R and I was going through the documentation 'ReferenceClasses {methods}'. (great work, by the way...) Reading associated Examples, something bothers me : it seems to me that there are errors in 'edit' and 'undo' methods. I th

Re: [R] (no subject)

2011-01-28 Thread Siri Bjoner
This looks like homework. We don't do homework. Certainly not when you obviously haven't a) read the posting guide, b) asked your professor/tutor, c) googled to see if you find something online, d) at least made an effort to try, and e) read the posting guide. Do all the points above and th

[R] Odp: (no subject)

2011-01-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 28.01.2011 15:37:07: > Hello, > I have a data set with each column containing data like this: > row column1 > 1 1.2 > 2 NA > 3 NA > 4 3 > 5 5 > 6 NA > 7 1.5 > 8 NA > 9 NA > 10 NA > 11 3 > 12 NA > 13 3 > 14 NA > 15 NA > 16 NA > 17 NA >

[R] Fwd: mvoutlier

2011-01-28 Thread stephen sefick
Begin forwarded message: > From: stephen sefick > Date: January 28, 2011 9:11:07 AM CST > To: "Claudia Paladini" > Subject: Re: [R] mvoutlier > > Try this. > > #your code > library(mvoutlier) > library(robustbase) > data(bsstop) > x=bsstop[1:100,5:14] > x.out=sign1(x,makeplot=TRUE) > > #my cod

Re: [R] survreg 3-way interaction

2011-01-28 Thread Terry Therneau
> I was wondering why survreg (in survival package) can not handle > three-way interactions. I have an AFT . You have given us no data to diagnose your problem. What do you mean by "cannot handle" -- does the package print a message "no 3 way interactions", gives wrong answers, your laptop

[R] (no subject)

2011-01-28 Thread Marine Andersson
Hello, I have a data set with each column containing data like this: row column1 1 1.2 2 NA 3 NA 4 3 5 5 6 NA 7 1.5 8 NA 9 NA 10 NA 11 3 12 NA 13 3 14 NA 15 NA 16 NA 17 NA 18 3 19 1.2 20 NA >From this I would like to extract the sequence containing at least three rows >of 3 i

Re: [R] Injecting code in a package?

2011-01-28 Thread Gabor Grothendieck
On Fri, Jan 28, 2011 at 8:57 AM, Nick Sabbe wrote: > Dear list, > > > > I've had this a few times now, and wonder if this is possible: > > I'm using a package, often for plotting something, but I want to tune the > way the plotting goes, in a way that was not foreseen by the maker of the > package

Re: [R] boxplot - how to supress groups with low counts

2011-01-28 Thread Peter Ehlers
On 2011-01-28 06:09, Uwe Ligges wrote: On 28.01.2011 14:21, pdb wrote: In a boxplot - how can I prevent groups where the number of cases is less than a set threshold from being plotted. set.seed(42) DF<- data.frame(type=sample(LETTERS[1:5], 100, replace=TRUE), cost=rnorm(100)) count<-

Re: [R] axis name editing

2011-01-28 Thread Uwe Ligges
Use the argument "las" as explained in ?par. Uwe Ligges On 28.01.2011 11:56, Yan Jiao wrote: Dear All, I'm generating a heatmap, is there a way to make Y axis name display horizontally, X axis name display vertically? I tried using "horiz=TRUE": axis(1,at=1:dim(cor.meta.m)[1],labels=gsub("

Re: [R] Injecting code in a package?

2011-01-28 Thread Uwe Ligges
On 28.01.2011 14:57, Nick Sabbe wrote: Dear list, I've had this a few times now, and wonder if this is possible: I'm using a package, often for plotting something, but I want to tune the way the plotting goes, in a way that was not foreseen by the maker of the package. Now, most of the tim

Re: [R] Measure execution time

2011-01-28 Thread Uwe Ligges
On 28.01.2011 09:07, Alaios wrote: Dear list members, I would like to measure how much time one function call makes from the time is call until the time it returns. Could you please tell me if that is possible in R? ?system.time Uwe Ligges Best Regards Alex ___

Re: [R] boxplot - how to supress groups with low counts

2011-01-28 Thread Uwe Ligges
On 28.01.2011 14:21, pdb wrote: In a boxplot - how can I prevent groups where the number of cases is less than a set threshold from being plotted. set.seed(42) DF<- data.frame(type=sample(LETTERS[1:5], 100, replace=TRUE), cost=rnorm(100)) count<- boxplot(cost ~ type, data=DF, plot = 0)

[R] Injecting code in a package?

2011-01-28 Thread Nick Sabbe
Dear list, I've had this a few times now, and wonder if this is possible: I'm using a package, often for plotting something, but I want to tune the way the plotting goes, in a way that was not foreseen by the maker of the package. Now, most of the time, these kinds of R functions (say pkg::pl

Re: [R] help for a loop procedure

2011-01-28 Thread Serena Corezzola
Hello Petr. First of all, thank you for your help! "If i understand you correctly, your real table U has 32 rows and you want to consider all subsets of at most 10 rows." Sorry, I wasn’t clear: I have more datasets to analyse, some of them of just 10 samples, and others of 32. So: sum(ch

[R] Odp: Letters(V1,V2..) as row col indices instead of numbers

2011-01-28 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 28.01.2011 09:52:05: > > What makes matrix to print V1, V2 as the row and col indices instead of > numbers?? > > cdata = read.table("ramesh.txt") #cdata is read from a file. > c1 = cor(cdata) > > I am printing c1 below. I need only numbers. I dont ne

[R] get type functions (was: RE: plot not generic)

2011-01-28 Thread Nick Sabbe
Thanks for that, Vito. Somehow, I often get lost in the whole slew of similar methods: * get * getMethod * showMethods * getAnywhere * methods Does anybody have a simple list of when to use which one? And maybe I'm even missing some variants? Thx. Nick. -Original Message- From: Vito Mu

Re: [R] read.table() versus scan()

2011-01-28 Thread Peter Ehlers
On 2011-01-27 20:23, H Roark wrote: I need to import a large number of simple, space-delimited text files with a few columns of data each. The one quirk is that some rows are missing data and some contain junk text at the end of each line. A typical file might look like: a b c d 1 2 3 x 4 5 6

Re: [R] plot not generic

2011-01-28 Thread Vito Muggeo (UniPa)
dear Nick, getAnywhere("plot.glmnet") Note the message you get when you type methods(plot) ... >>> Non-visible functions are asterisked Il 28/01/2011 14.26, Nick Sabbe ha scritto: Hello list. I was trying to see some of the code for plot.glmnet in package glmnet (this function name i

[R] Free R Course Chile / Curso Gratis R (Universidad Andres Bello)

2011-01-28 Thread Jose Bustos Melo
(English version below) Queridos R-usuarios!   Con mis colegas estamos creando un curso básico de nuestra espectacular herramienta R. Nos hemos dado cuenta que muchas personas usan software comercial y pensamos que sería una buena oportunidad para dar un curso gratis acerca de R. Por otro

Re: [R] Saving log file in R and display run time

2011-01-28 Thread Uwe Ligges
On 27.01.2011 19:33, Raquel Rangel de Meireles Guimarães wrote: Hi all, I have two basic questions, hope you should help me: 1. How do I save a log file in R with the results? For example, in Stata it can be done by using "log using c:\...\test.txt" See ?sink. 2. How do I display the exe

[R] plot not generic

2011-01-28 Thread Nick Sabbe
Hello list. I was trying to see some of the code for plot.glmnet in package glmnet (this function name is in the documentation). After loading the library, I tried the obvious typing in the name, but I received a message telling me it could not be found. So I fiddled around a little, and n

Re: [R] adding text to y-axis per row of panels (lattice)

2011-01-28 Thread Deepayan Sarkar
On Fri, Jan 28, 2011 at 5:21 PM, E Hofstadler wrote: > Hello Deepayan, > > many thanks for your reply and help. Does this solution with > "ylab.right" require a newer version of lattice (somewhere in the > archives I noted "ylab.right" being mentioned in the context of a > development version of l

[R] boxplot - how to supress groups with low counts

2011-01-28 Thread pdb
In a boxplot - how can I prevent groups where the number of cases is less than a set threshold from being plotted. set.seed(42) DF <- data.frame(type=sample(LETTERS[1:5], 100, replace=TRUE), cost=rnorm(100)) count <- boxplot(cost ~ type, data=DF, plot = 0) count$n ## how to only include plo

Re: [R] Linear mixed model: question about t-values

2011-01-28 Thread Ben Bolker
Kostenko, Olga nioo.knaw.nl> writes: > I have a question about the output of linear mixed model fitted in R > using nlme package. In particular, what are the t-values that are given > in an output, how are they calculated and based on what test? I guess it > cannot be a simple Student t-test, ot

[R] Error using write.xlsx library(xlsx)

2011-01-28 Thread Quark
Dear Adrian, I would like to export a quite large matrix from R to Excel (40 columns, 257 597 rows). After 10 minutes of work, I get the following error message: Error in .jcall(row[[ir]], "Lorg/apache/poi/ss/usermodel/Cell;", "createCell", : Java Exception This is the code I used: write.

Re: [R] Quasi-poisson glm and calculating a qAIC and qAICc...trying to modilfy Bolker et al. 2009 function to work for a glm model

2011-01-28 Thread Jason Nelson
Gavin, Thanks for your help, but I did find in Booker et al. 2009 supplemental material where they did use logLik for quasi- distributed data. Even though it was for mixed models effect. In section 6 in the supplemental material, this is the model: mp1 <- lmer(total.fruits ~ nutrient * amd + ra

Re: [R] adding text to y-axis per row of panels (lattice)

2011-01-28 Thread E Hofstadler
Hello Deepayan, many thanks for your reply and help. Does this solution with "ylab.right" require a newer version of lattice (somewhere in the archives I noted "ylab.right" being mentioned in the context of a development version of lattice)? I currently use R version 2.11.1 (2010-05-31) via Emac

Re: [R] read.table() versus scan()

2011-01-28 Thread Gabor Grothendieck
On Thu, Jan 27, 2011 at 11:23 PM, H Roark wrote: > > I need to import a large number of simple, space-delimited text files with a > few columns of data each. The one quirk is that some rows are missing data > and some contain junk text at the end of each line. A typical file might look > like:

Re: [R] Problem with R Installation - .RData

2011-01-28 Thread Prof Brian Ripley
On Fri, 28 Jan 2011, Duncan Murdoch wrote: On 11-01-28 5:15 AM, Iva wrote: Dear All, I have Windows Vista and I want to install R. However, when I tried to start it after the installation, I received the following message: 'Fatal error. I cannot retrieve the saved data from .RData'. So, in

Re: [R] Problem with R Installation - .RData

2011-01-28 Thread Duncan Murdoch
On 11-01-28 5:15 AM, Iva wrote: Dear All, I have Windows Vista and I want to install R. However, when I tried to start it after the installation, I received the following message: 'Fatal error. I cannot retrieve the saved data from .RData'. So, in the moment R does not work. Do you have any i

Re: [R] agnes clustering and NAs

2011-01-28 Thread Martin Maechler
> Gavin Simpson > on Fri, 28 Jan 2011 09:23:05 + writes: > On Fri, 2011-01-28 at 10:00 +1100, Dario Strbenac wrote: >> Hello, >> >> Yes, that's right, it is a values matrix. Not a dissimilarity matrix. >> >> i.e. >> >> > str(iMatrix) >> num [

Re: [R] Help for lattice. par(new=TRUE)

2011-01-28 Thread Deepayan Sarkar
On Fri, Jan 21, 2011 at 8:22 PM, Fabrice Tourre wrote: > Hi list, > I want to plot two plot in the same figure. I set par(new=TRUE). But > it does not work. > > library(lattice) > myPanel <- function(x,...) > { >       panel.histogram(x,alpha=0.4,...) >       ltext(0.4,1.5,paste("Mean=","0.05",dig

Re: [R] asterisk in subscript

2011-01-28 Thread Andrew Collier
magic! this does the trick: expression(paste(italic(n)[symbol("\052")])) thanks for the hint, ted! -- Andrew B. Collier Physicist Waves and Space Plasmas Group Hermanus Magnetic Observatory Honorary Senior Lecturer tel: +27 31 2601157 Space Physics Research Institu

[R] axis name editing

2011-01-28 Thread Yan Jiao
Dear All, I'm generating a heatmap, is there a way to make Y axis name display horizontally, X axis name display vertically? I tried using "horiz=TRUE": axis(1,at=1:dim(cor.meta.m)[1],labels=gsub("module","",pw.names),horiz=T RUE) but got warning message and the name is not displayed as I wi

Re: [R] circular reference lines in splom

2011-01-28 Thread Deepayan Sarkar
On Thu, Jan 20, 2011 at 9:45 AM, Max Kuhn wrote: > Hello everyone, > > I'm stumped. I'd like to create a scatterplot matrix with circular > reference lines. Here is an example in 2d: > > library(ellipse) > > set.seed(1) > dat <- matrix(rnorm(300), ncol = 3) > colnames(dat) <- c("X1", "X2", "X3") >

[R] survreg 3-way interaction

2011-01-28 Thread tdenes
Dear All, I was wondering why survreg (in survival package) can not handle three-way interactions. I have an AFT (accelerated failure time) model with a frailty term. If the model is restricted to two-way interactions, survreg and gamlss.cens (with random() term) give very similar results, except

Re: [R] Help needed

2011-01-28 Thread Gavin Simpson
On Thu, 2011-01-27 at 09:50 -0500, Thomas Stewart wrote: > For question 2, > > TTT <- rt(1000,3) > mean(TTT[rank(TTT) <= 975 & rank(TTT) >25]) mean(TTT, trim = 0.05) What you are doing is only removing 5% of observations in total, whilst the question asks for 5% removed off *each* end. G > >

Re: [R] adding text to y-axis per row of panels (lattice)

2011-01-28 Thread Deepayan Sarkar
On Thu, Jan 20, 2011 at 2:04 PM, E Hofstadler wrote: > Dear all, > > Being a newbie to R, I've trawled through many old posts on this list > looking for a solution to my problem, but unfortunately couldn't quite > figure it out myself. I'd be very grateful if someone here on this > list could perh

Re: [R] asterisk in subscript

2011-01-28 Thread Ted Harding
On 28-Jan-11 10:24:23, Andrew Collier wrote: > thanks for the rapid response. > > yes, in x11 your suggestion works perfectly. i have never > thought of the asterisk as being a superscript... to me it > has always been the "mulitply" sign which is centred. > thanks for the education! > > however,

Re: [R] Quasi-poisson glm and calculating a qAIC and qAICc...trying to modilfy Bolker et al. 2009 function to work for a glm model

2011-01-28 Thread Gavin Simpson
On Thu, 2011-01-27 at 08:20 -0500, Jason Nelson wrote: > Sorry about re-posting this, it never went out to the mailing list when I > posted this to r-help forum on Nabble and was pending for a few days, now > that I am subscribe to the mailing list I hope that this goes out: > > I've been a viewer

Re: [R] HLM Model

2011-01-28 Thread Silvano
Hi Belle, try this: SAS: proc mixed data=test noclprint noinfo covtest noitprint method=reml; class pair grade team school; model score = trt pair grade school / solution ddfm=bw notest; random int / sub=team solution type=un r; run; R: require(nlme) unstruct <- gls(score~trt+pair+grade+sc

Re: [R] help for a loop procedure

2011-01-28 Thread Petr Savicky
On Thu, Jan 27, 2011 at 05:30:15PM +0100, Petr Savicky wrote: > On Thu, Jan 27, 2011 at 11:30:37AM +0100, Serena Corezzola wrote: > > Hello everybody! > > > > > > > > I?m trying to define the optimal number of surveys to detect the highest > > number of species within a monitoring season/session

[R] Linear mixed model: question about t-values

2011-01-28 Thread Kostenko, Olga
Dear all, I have a question about the output of linear mixed model fitted in R using nlme package. In particular, what are the t-values that are given in an output, how are they calculated and based on what test? I guess it cannot be a simple Student t-test, otherwise how can the simple Student

Re: [R] optim function multi variables -newbie

2011-01-28 Thread michalseneca
I tried to modify the code,thanks for noticing...now i get that the function cannot be evaluated at initial parameters.However I do not know what does that mean..Should I try to modify parameters. I am still not sure of syntax of function. I cannot get that optimize work correctly. I am trying to

[R] Problem with R Installation - .RData

2011-01-28 Thread Iva
Dear All, I have Windows Vista and I want to install R. However, when I tried to start it after the installation, I received the following message: 'Fatal error. I cannot retrieve the saved data from .RData'. So, in the moment R does not work. Do you have any idea how to cope with this problem?

Re: [R] asterisk in subscript

2011-01-28 Thread Andrew Collier
thanks for the rapid response. yes, in x11 your suggestion works perfectly. i have never thought of the asterisk as being a superscript... to me it has always been the "mulitply" sign which is centred. thanks for the education! however, my plot is being sent to postscript, which i guess does not

  1   2   >