Re: [R] [R-sig-Geo] Using RGDAL to copy header information...

2008-11-06 Thread Roger Bivand
On Wed, 5 Nov 2008, Jonathan Greenberg wrote: R-geographers... I'm trying to solve a problem to implement a line-by-line tiled processing using RGDAL (read 1 line of an image, process the one line, write one line of the image to a binary file). Everything except for the final step I'm able

[R] Mean Computation for Data from External File

2008-11-06 Thread christabel jane
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] Data manipulation question

2008-11-06 Thread Peter Jepsen
Dear R-listers, I am a relatively inexperienced R-user currently migrating from Stata. I am deeply frustrated by this data manipulation question: I know how I could do it in Stata, but I cannot make it work in R. I have a data frame of hospitalization data where each row represents an admission.

Re: [R] Reshape a matrix

2008-11-06 Thread ONKELINX, Thierry
Dear Dinesh, Have a look at ?cast for the reshape package dataset - data.frame(Col1 = LETTERS[1:3], Col2 = sort(rev(LETTERS)[1:3]), value = 1:3) dataset Col1 Col2 value 1AX 1 2BY 2 3CZ 3 library(reshape) cast(Col1 ~ Col2, data = dataset, fill = 0) Col1

Re: [R] Memory limits for large data sets

2008-11-06 Thread Uwe Ligges
Alan Cohen wrote: Hello, I have several very large data sets (1-7 million observations, sometimes hundreds of variables) that I'm trying to work with in R, and memory seems to be a big issue. I'm currently using a 2 GB Windows setup, but might have the option to run R on a server

Re: [R] Methods dispatch and inheritance R.oo

2008-11-06 Thread Yuri Volchik
Thanks for reply Henrik, seems obvious now. Can child class (B) access argument of the parent class, i.e. can i rewrite definition of the class B as setConstructorS3(ClassB, function() { extend(ClassA(), ClassB, .size2 = A ); }) it didn't work for me, so guess i'm doing smth wrong and i

[R] lars

2008-11-06 Thread Sohail
Hi, Can anyone tell me how we can have the optimal value of lambda from lars package? I want to extract the estimates against this optimal value of lambda. I have tried the predict.lars and coef.lars but these provide entire sequence of coefficients. I don't know how to have the optimal one.

[R] splinefun and interpSpline

2008-11-06 Thread Rune Schjellerup Philosof
On the splinefun help page it refers to the interpSpline function from the splines package. What are the differences in the results, other than splinefun returns a function and with interpSpline you use predict. The only difference from the help pages seems to be the deriv option of splinefun, are

Re: [R] unlist dataframes

2008-11-06 Thread Naira
I have forgotten to say that the elements in the list are not necessarily equal... meaning that x1 and x2 are from different dimensions so I can't use data.frame(l) More suitable example: x1=data.frame(Name=LETTERS[1:2],Age=1:2) x2=data.frame(Name=LETTERS[3:5],Age=3:5) l=list(x1,x2) l l

Re: [R] R Mixed Anova

2008-11-06 Thread Mark Difford
Hi Rodrigo, Here are two options; for each type, the second version gives 2nd order interactions ## aov T.aovmod - aov(response ~ Season + Beach + Line + Error(Block/Strata)) T.aovmod - aov(response ~ (Season + Beach + Line)^2 + Error(Block/Strata)) ## lme library(nlme) T.lmemod - lme(response

Re: [R] unlist dataframes

2008-11-06 Thread Naira
Thanks a lot :) It is doing exactly what I want Naira David Freedman wrote: try newdata=do.call(rbind,l) David Freedman, Atlanta Naira wrote: Dear all, I would like to know whether it is possible to unlist elements and keep the original format of the data. To make

Re: [R] how to make a multiple plot

2008-11-06 Thread baptiste auguie
perhaps you could also look into ggplot2 or lattice package to display several plots on the same page. They take care of important but annoying details such as scaling, layout, limits, legend, ... Admittedly, there is a learning curve when you're used to base graphics, but in the long term

Re: [R] unlist dataframes

2008-11-06 Thread Henrique Dallazuanna
Try this: unlist(lapply(l, t)) On Thu, Nov 6, 2008 at 9:05 AM, Naira [EMAIL PROTECTED] wrote: I have forgotten to say that the elements in the list are not necessarily equal... meaning that x1 and x2 are from different dimensions so I can't use data.frame(l) More suitable example:

Re: [R] r script

2008-11-06 Thread Paul Hiemstra
Alfredo Alessandrini wrote: A simple question :-) I'm writing a R scritp(#!/usr/bin/Rscript) How can execute a bash command inside the script, like the command for change the directory (cd)? Thanks in advance, Alfredo __ R-help@r-project.org

[R] r script

2008-11-06 Thread Alfredo Alessandrini
A simple question :-) I'm writing a R scritp(#!/usr/bin/Rscript) How can execute a bash command inside the script, like the command for change the directory (cd)? Thanks in advance, Alfredo __ R-help@r-project.org mailing list

Re: [R] unlist dataframes

2008-11-06 Thread David Freedman
try newdata=do.call(rbind,l) David Freedman, Atlanta Naira wrote: Dear all, I would like to know whether it is possible to unlist elements and keep the original format of the data. To make it more clear, let me give an exemple: I have a list l of dataframes that I created with

[R] gamlss.dist

2008-11-06 Thread Michael Kubovy
Hi, I'm not sure how use curve(dexGAUS(… None of the following four works: rt- rexGAUS(100, mu=300, nu=100, sigma=35) m1-gamlss(rt~1, family=exGAUS) curve(dexGAUS(rt=x, mu=300 ,sigma=35,nu=100), 100, 600, main = The ex- GAUS density mu=300 ,sigma=35,nu=100) curve(dexGAUS(x=rt, mu=300

Re: [R] read Idrisi file

2008-11-06 Thread Roger Bivand
Abdou Ali a.ali at agrhymet.ne writes: Dear Sirs, Is there a R function to read an Idrisi image (*.rdc *.rst) Yes, please see the rgdal package, which can read this format. The Spatial Task View (CRAN) might have got you the information you need without posting. Depending on the size of

[R] Inference and confidence interval for a restricted cubic spline function in a hurdle model

2008-11-06 Thread Erik Lampa
Dear list, I'm currently analyzing some count data using a hurdle model. I've used the rcspline.eval function in the Hmisc-library to contruct the spline terms for the regression model, and what I want in the end is the ability to compute coefficients and confidence intervals for different

Re: [R] How to get the length of an UTF-8 string

2008-11-06 Thread Prof Brian Ripley
On Thu, 6 Nov 2008, Fán Lóng wrote: Hi there, I am intending to get the length of an UTF-8 string which contains some Japanese characters (let's say, rstr) in R language. I try to use the nchar(rstr) to get its length, however, it returns the NA for it contains some multi-byte characters. Is

Re: [R] mean computation for external data

2008-11-06 Thread Uwe Ligges
christabel_jane prudencio wrote: I have an external data (.txt) for annual peak flood. The first column is the year, second column is the observation date, and the last is the observed discharge. My task is to calculate the mean, skewness and kurtosis of the said data. I was advised to use

Re: [R] Simple rep() question duplicating times and dates.

2008-11-06 Thread Solveig Mimler
Hi John, I had the same problem yesterday and solved it like following: seq(ISOdate(Year,Month,Day,Hour), by=hour, length=24*365) for example: seq(ISOdate(2005,1,1,0), by=hour, length=8760) Regards, Solveig EIFER Europäisches Institut für Energieforschung Institut européen de recherche sur

[R] mean computation for external data

2008-11-06 Thread christabel_jane prudencio
I have an external data (.txt) for annual peak flood. The first column is the year, second column is the observation date, and the last is the observed discharge. My task is to calculate the mean, skewness and kurtosis of the said data. I was advised to use read.table() to read the entire

[R] RES: R Mixed Anova

2008-11-06 Thread Rodrigo Aluizio
Thanks Mark, it was exactly what I was looking for. -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de Mark Difford Enviada em: quinta-feira, 6 de novembro de 2008 09:22 Para: r-help@r-project.org Assunto: Re: [R] R Mixed Anova Hi Rodrigo, Here are two

[R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Oliver Bandel
Hello, for a simulation I tried the following: = sampmeanvec - function (from, n, repititions) { print( paste(samplesize n:, n, repititions:, repititions) ) samples.mat - as.matrix( replicate( repititions, sample(from, n) ) )

Re: [R] r script

2008-11-06 Thread Barry Rowlingson
2008/11/6 Paul Hiemstra [EMAIL PROTECTED]: How can execute a bash command inside the script, like the command for change the directory (cd)? ?system The system function won't work for changing the working directory of R though: getwd() [1] /home/rowlings system(cd /) getwd() [1]

[R] RE : Text function in 3D graph

2008-11-06 Thread EVANS David-William
I produced the 3D plot with cloud function (lattice package), but rgl package works well: I can easily plot in 3D and annotate. Thank you very much for your help. Sebastian. - Merci de répondre à cette adresse e-mail et à [EMAIL PROTECTED] Please reply both to this email

[R] R Mixed Anova

2008-11-06 Thread Rodrigo Aluizio
Hi list, I was searching how to properly write a command line for a mixed ANOVA. Well honestly, there are so many material on the older post of the list that just confused me. I have five factors. Season (fixed) Beach (fixed) Line (fixed) Block (random) Strata (random) nested in Block

[R] Queries about step() and stepAIC()

2008-11-06 Thread Philip Whittall
I have been learning how to use these functions and would like to know the following as I have so far been unable to find the answers in the documentation. 1) What stopping rules are used ? 2) Can the stopping rules be changed? 3) Can the results of each step be stored as objects in R and if so

[R] How to get the length of an UTF-8 string

2008-11-06 Thread Fán Lóng
Hi there, I am intending to get the length of an UTF-8 string which contains some Japanese characters (let's say, rstr) in R language. I try to use the nchar(rstr) to get its length, however, it returns the NA for it contains some multi-byte characters. Is there any alternatives to return the

[R] unlist dataframes

2008-11-06 Thread Naira
Dear all, I would like to know whether it is possible to unlist elements and keep the original format of the data. To make it more clear, let me give an exemple: I have a list l of dataframes that I created with apply but which looks like this: x1=data.frame(Name=LETTERS[1:2],Age=1:2)

Re: [R] Calling optim and .C

2008-11-06 Thread Armin Meier
Thanks, your answer just helped me to find the error. Armin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] Data manipulation question

2008-11-06 Thread bartjoosen
How about: id - c(rep(a,4),rep(b,2), rep(c,5), rep(d,1)) start - c(c(0,6,17,20),c(0,1),c(0,5,10,11,50),c(0)) stop - c(c(6,12,20,30),c(1,10),c(3,10,11,30,55),c(6)) data - data.frame(id,start,stop) f - function(data){ m - match(data$start,data$stop) + 1 if (length(m)==1

Re: [R] Data manipulation question

2008-11-06 Thread cruz
On Thu, Nov 6, 2008 at 4:23 PM, Peter Jepsen [EMAIL PROTECTED] wrote: Here is an example: id - c(rep(a,4),rep(b,2), rep(c,5), rep(d,1)) start - c(c(0,6,17,20),c(0,1),c(0,5,10,11,50),c(0)) stop - c(c(6,12,20,30),c(1,10),c(3,10,11,30,55),c(6)) data - as.data.frame(cbind(id,start,stop)) data

[R] mean computation for external data

2008-11-06 Thread christabel jane
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Data manipulation question

2008-11-06 Thread Peter Jepsen
Thank you for your prompt assistance, cruz and Bart. Bart set me on the right track, and I modified his proposal to this: f - function(data){ m - match(data$stop,data$start) n - min(length(m),which(is.na(m))) data$stop[n] } by(data,data$id,f) It also handles some

[R] need help in plotting barchart

2008-11-06 Thread Kurapati, Ravichandra (Ravichandra)
Df contains Session_Setup DCT RevDataVols_bincounts comp 1Session_Setup RLL 1NA Session_Setup+RLL+1 2Session_Setup RLL 2NA Session_Setup+RLL+2 3Session_Setup RLL 3NA Session_Setup+RLL+3 4

[R] Bio7 1.3 for Linux released!

2008-11-06 Thread Bio7
Release notes: http://www.nabble.com/Bio7-1.3-Linux-released!-td20360723.html#a20360723 http://www.nabble.com/Bio7-1.3-Linux-released!-td20360723.html#a20360723 With kind regards M.Austenfeld -- View this message in context:

[R] Including graphics files in MS office / open office

2008-11-06 Thread hadley wickham
Hi all, I'm trying to write up some recommendations for what graphics formats are most useful for inclusion into ms office and openoffice. There have been a few discussions on the list in the past, but I haven't seen a summary. These are the options I've seen so far, along with there costs and

Re: [R] Including graphics files in MS office / open office

2008-11-06 Thread Philippe Grosjean
Hello Hadley, I have started this: http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:export. One solution that works not too bad in OpenOffice is to output the graph in XFig format, and then use fig2dev from transfig to get an EMF file. That one is rather well readable by

[R] wireframe

2008-11-06 Thread Bill Szkotnicki
I've been using lattice/wireframe succesfully to visualize some data. I have one question. I want to be able to change the viewpoint ( i.e. rotate the plotted figure a bit left or right or up and down ) Is there a way to do that? Or is there some other package around that could help? Thanks.

[R] Re : Dataframe help

2008-11-06 Thread Olivier ETERRADOSSI
Hi Ramya, Sorry if I missed something, but unless I have problems reading your message it seems that there is no line in your example matching both your test conditions... Hope this helps. Olivier Hi there, I have a dataframe length.unique.info length.unique.info abc 12 345 def

[R] replacing characters in formulae / models

2008-11-06 Thread Christoph Scherber
Dear all, How can I replace text in objects that are of class formula? y=a * x + b class(y)=formula grep(x,y) y[1] Suppose I would like to replace the x by w in the formula object y. How can this be done? Somehow, the methods that can be used in character objects do not work 1:1 in formula

[R] comparing matrices using max or min

2008-11-06 Thread Diogo André Alagador
Dear all, I have 3 matrices with the same dimension, A,B,C and I would like to produce a matrix D where in each position would retrieve the max(or min) value along A,B,C taken from the same position. I guess that apply functions should fit, but for matrices objects I am not getting it. thanks

Re: [R] wireframe

2008-11-06 Thread Kornelius Rohmeyer
Am Donnerstag, den 06.11.2008, 10:38 -0500 schrieb Bill Szkotnicki: I've been using lattice/wireframe succesfully to visualize some data. I have one question. I want to be able to change the viewpoint ( i.e. rotate the plotted figure a bit left or right or up and down ) Is there a way to do

Re: [R] wireframe

2008-11-06 Thread jim holtman
Try the 'rgl' package. On Thu, Nov 6, 2008 at 10:38 AM, Bill Szkotnicki [EMAIL PROTECTED] wrote: I've been using lattice/wireframe succesfully to visualize some data. I have one question. I want to be able to change the viewpoint ( i.e. rotate the plotted figure a bit left or right or up and

Re: [R] Including graphics files in MS office / open office

2008-11-06 Thread Max Kuhn
* svg: R output devices still experimental I've been using the svg device in the Cairo package for a while now. I've never had any issues with it and wouldn't characterize it as experimental (of course, others may have had issues). I have had problems generating svg using some of the non-Cairo

Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Charles C. Berry
On Thu, 6 Nov 2008, Oliver Bandel wrote: Hello, for a simulation I tried the following: = sampmeanvec - function (from, n, repititions) { print( paste(samplesize n:, n, repititions:, repititions) ) samples.mat - as.matrix(

Re: [R] Including graphics files in MS office / open office

2008-11-06 Thread hadley wickham
On Thu, Nov 6, 2008 at 10:05 AM, Max Kuhn [EMAIL PROTECTED] wrote: * svg: R output devices still experimental I've been using the svg device in the Cairo package for a while now. I've never had any issues with it and wouldn't characterize it as experimental (of course, others may have had

[R] New to R - Errors in plotting

2008-11-06 Thread BKMooney
I am new to R and am running into trouble with the function plot. When I enter in the simple code: x-1:4 y-5:8 plot(x,y) I get a scatter plot with 4 points as expected. However, with my own data, A and B are both vectors of length ~85, each entry a decimal in [0,1]. Using the same

Re: [R] Including graphics files in MS office / open office

2008-11-06 Thread hadley wickham
Hi Phillippe, Thanks for the pointer. It looks like a nice resource. Hadley On Thu, Nov 6, 2008 at 9:34 AM, Philippe Grosjean [EMAIL PROTECTED] wrote: Hello Hadley, I have started this: http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:export. One solution that works not too

Re: [R] Reshape a matrix

2008-11-06 Thread Gabor Grothendieck
Assuming you mean data frame and not matrix and depending on whether the empty spaces are intended to represent NA or 0 we have: DF - data.frame(V1 = LETTERS[1:3], V2 = LETTERS[24:26], V3 = 1:3) tapply(DF[[3]], DF[1:2], c) V2 V1 X Y Z A 1 NA NA B NA 2 NA C NA NA 3 xtabs(V3 ~ V1

[R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread cruz
Hi, I am writing this in a wrong way, can someone please correct me? A - matrix() length(A) - 6 dim(A) - c(3,2) colnames(A) - c(X,Y) A X Y [1,] NA NA [2,] NA NA [3,] NA NA A$X Error in A$X : $ operator is invalid for atomic vectors Thanks, cruz

Re: [R] New to R - Errors in plotting

2008-11-06 Thread jim holtman
You need to provide more information. PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Show at least an 'str' of your data if you can not include it and the commands that you were using. On Thu, Nov 6,

Re: [R] replacing characters in formulae / models

2008-11-06 Thread Charles C. Berry
On Thu, 6 Nov 2008, Christoph Scherber wrote: Dear all, How can I replace text in objects that are of class formula? y=a * x + b class(y)=formula grep(x,y) y[1] What exactly are you trying to accomplish?? And why did you assign 'formula' as the class of a character string? 'y' is not a

Re: [R] New to R - Errors in plotting

2008-11-06 Thread Erik Iverson
Hello - In you example, what are the classes of x and y? x-1:4 y-5:8 plot(x,y) class(x) class(y) In your 'real' data, what are the classes of A and B class(A) class(B) One may be a factor? How are you reading your data into R, read.table? Make sure your data are numeric, then plot

Re: [R] New to R - Errors in plotting

2008-11-06 Thread Duncan Murdoch
On 06/11/2008 11:18 AM, BKMooney wrote: I am new to R and am running into trouble with the function plot. When I enter in the simple code: x-1:4 y-5:8 plot(x,y) I get a scatter plot with 4 points as expected. However, with my own data, A and B are both vectors of length ~85, each entry

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread Erik Iverson
Hello - cruz wrote: Hi, I am writing this in a wrong way, can someone please correct me? A - matrix() length(A) - 6 dim(A) - c(3,2) colnames(A) - c(X,Y) A X Y [1,] NA NA [2,] NA NA [3,] NA NA A$X Error in A$X : $ operator is invalid for atomic vectors A[, X] may be what you want?

Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Oliver Bandel
Hello Charles, thank you for the hint. Zitat von Charles C. Berry [EMAIL PROTECTED]: [...] This looks good (and correct to me). Look again . It is not the same as what you have above. [...] OK, yes, you are right! I mixed the two parameters... Now I get the same problem also at the

Re: [R] replacing characters in formulae / models

2008-11-06 Thread Christoph Scherber
Dear all, Dear Keith, Well, of course in fact the problem is more complicated than that. The example was just for illustration. I have several statistical models for which I want to retrieve predictions using delta.method (from library(alr3)). Now for this I need a character string such as

Re: [R] Using a background photo in lattice--title and axes missing

2008-11-06 Thread Waichler, Scott R
I am trying to use a background photo in a lattice plot. I am using the rimage and TeachingDemos packages to plot the photo and translate from the photo coordinates in pixels to geographic coordinates, which is what I want to use for plotting contours, lines, etc. The (unrunable) code

[R] need help with SIGNAL module

2008-11-06 Thread Michael Tiemann
I sent this message to the maintainer's email address listed on the signal package, but it bounced. Perhaps somebody on this list has more insight into the signal package than I do (or knows the maintainer's new address): Subject: question about buttord function in R signal module From:

[R] How to manipulate the time data without the date?

2008-11-06 Thread tedzzx
Hi,all I only got the time data such as: tms-c(19:30:23,18:39:10.) I want to manipulate this time series data. For example, plus one second(or minute) or minus one second This data only has the time(h:m:s), without the date. I know that there are chron package, ISOPix class and the

[R] FW: [rkward-devel] questions on RKWard

2008-11-06 Thread Horace Tso
Thought I should copy the list with Matthieu's response. H -Original Message- From: Matthieu Stigler [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2008 8:29 PM To: Horace Tso; [EMAIL PROTECTED] Subject: Re: [rkward-devel] questions on RKWard some answer only for the third

Re: [R] How to manipulate the time data without the date?

2008-11-06 Thread Prof Brian Ripley
Why not give it an arbitrary date such 2008-01-01? On Thu, 6 Nov 2008, tedzzx wrote: Hi,all I only got the time data such as: tms-c(19:30:23,18:39:10.) I want to manipulate this time series data. For example, plus one second(or minute) or minus one second This data only has the

Re: [R] How to manipulate the time data without the date?

2008-11-06 Thread Gabor Grothendieck
On Thu, Nov 6, 2008 at 12:10 PM, tedzzx [EMAIL PROTECTED] wrote: Hi,all I only got the time data such as: tms-c(19:30:23,18:39:10.) I want to manipulate this time series data. For example, plus one second(or minute) or minus one second This data only has the time(h:m:s), without the

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread anna freni sterrantino
Hi Cruz you don't need to assign dimension or classes to your objects. It's easier if you do like this a=c(0,1,2,4,1,1) length(a) [1] 6 b=matrix(a,3,2,byrow=T) b [,1] [,2] [1,]01 [2,]24 [3,]11 of course you can change the colnames and assign what you prefer

[R] Strang line while plotting failure curves

2008-11-06 Thread Lu, Jiang
Dear R helper, I encountered a problem when I tried to plot the cumulative failure rate (i.e. 1 - survival probability). I have used the following code to plot. The scenario is that patients are randomized to different treatment arm (rev in the code), the PCI revascularization was monitored over

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of anna freni sterrantino Sent: Thursday, November 06, 2008 10:00 AM To: cruz; r-help@r-project.org Subject: Re: [R] How to avoid $ operator is invalid for atomic vectors Hi Cruz you don't need to

Re: [R] How to manipulate the time data without the date?

2008-11-06 Thread John Kane
Does this help? library(chron) tms-c(19:30:23,18:39:10) mytimes - times(tms) mytimes[1]-mytimes[2] --- On Thu, 11/6/08, tedzzx [EMAIL PROTECTED] wrote: From: tedzzx [EMAIL PROTECTED] Subject: [R] How to manipulate the time data without the date? To: r-help@r-project.org Received:

Re: [R] Simple rep() question duplicating times and dates.

2008-11-06 Thread John Kane
Hi Solveig, Thanks very much, it's a nice solution and one I had not even begun to think about. I MUST learn more about dates! --- On Thu, 11/6/08, Solveig Mimler [EMAIL PROTECTED] wrote: From: Solveig Mimler [EMAIL PROTECTED] Subject: Re: Simple rep() question duplicating times and

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread cruz
Thanks for all the responses, they are all very helpful:) you don't need to assign dimension or classes to your objects. It's easier if you do like this this is something that really bothers me, when I need to define an object which i will later fill with data, the dimension of this object

Re: [R] mean computation for external data

2008-11-06 Thread John Kane
?mean kurtosis http://finzi.psych.upenn.edu/R/Rhelp02a/archive/110186.html --- On Thu, 11/6/08, christabel_jane prudencio [EMAIL PROTECTED] wrote: From: christabel_jane prudencio [EMAIL PROTECTED] Subject: [R] mean computation for external data To: r-help@r-project.org Received:

Re: [R] Strang line while plotting failure curves

2008-11-06 Thread Frank E Harrell Jr
Lu, Jiang wrote: Dear R helper, I encountered a problem when I tried to plot the cumulative failure rate (i.e. 1 - survival probability). I have used the following code to plot. The scenario is that patients are randomized to different treatment arm (rev in the code), the PCI revascularization

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread cruz
Does that answer your question? Thanks:) I received one from Erin: x - NULL __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread Jeffrey Horner
cruz wrote on 11/06/2008 12:16 PM: Thanks for all the responses, they are all very helpful:) you don't need to assign dimension or classes to your objects. It's easier if you do like this this is something that really bothers me, when I need to define an object which i will later fill with

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread John Kane
Does this help (mylist - list(NULL)) (mylist[[3]] - data.frame(a=1:4, b=letters[1:4])) mylist (mylist[[2]] - matrix(1:12, nrow=4)) mylist --- On Thu, 11/6/08, cruz [EMAIL PROTECTED] wrote: From: cruz [EMAIL PROTECTED] Subject: Re: [R] How to avoid $ operator is invalid for atomic vectors

[R] PCA

2008-11-06 Thread Noela Sánchez
I need perform PCA analyst with a matrix with more variables than units. The princomp command don't match with this matrix. Anybody knows a good command to do it? -- Noela [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] PCA

2008-11-06 Thread stephen sefick
would you please provide a dummy example that explains your problem. Then maybe I can help you. thanks Stephen On Thu, Nov 6, 2008 at 1:42 PM, Noela Sánchez [EMAIL PROTECTED] wrote: I need perform PCA analyst with a matrix with more variables than units. The princomp command don't match with

Re: [R] PCA

2008-11-06 Thread Prof Brian Ripley
?princomp refers you to prcomp for that case: 'princomp' only handles so-called R-mode PCA, that is feature extraction of variables. If a data matrix is supplied (possibly via a formula) it is required that there are at least as many units as variables. For Q-mode PCA use

Re: [R] PCA

2008-11-06 Thread Jorge Ivan Velez
Hi Noela, Take a loot at ?prcomp HTH, Jorge On Thu, Nov 6, 2008 at 1:42 PM, Noela Sánchez [EMAIL PROTECTED] wrote: I need perform PCA analyst with a matrix with more variables than units. The princomp command don't match with this matrix. Anybody knows a good command to do it? --

Re: [R] mean computation for external data

2008-11-06 Thread Jorge Ivan Velez
Hi Christabel, Take a look at the function basicStats in the fBasics package. Here is an example: library(fBasics) set.seed(123) x=rnorm(20,24,2) basicStats(x) #x #nobs 20.00 #NAs 0.00 #Minimum 20.066766 #Maximum 27.573826 #1. Quartile 23.012892 #3. Quartile

Re: [R] PCA

2008-11-06 Thread Noela Sánchez
My matrix have 436 registers and 518 variables. I need to do a PCA analyst. Usually I use princomp command to perform PCA analyst, but this time i can't because of my variables are more than my registers. 2008/11/6 stephen sefick [EMAIL PROTECTED] would you please provide a dummy example that

Re: [R] Methods dispatch and inheritance R.oo

2008-11-06 Thread Henrik Bengtsson
Hi, On Thu, Nov 6, 2008 at 2:12 AM, Yuri Volchik [EMAIL PROTECTED] wrote: Thanks for reply Henrik, seems obvious now. Can child class (B) access argument of the parent class, i.e. can i rewrite definition of the class B as setConstructorS3(ClassB, function() { extend(ClassA(), ClassB,

Re: [R] How to avoid $ operator is invalid for atomic vectors

2008-11-06 Thread Patrick Burns
cruz wrote: Thanks for all the responses, they are all very helpful:) you don't need to assign dimension or classes to your objects. It's easier if you do like this this is something that really bothers me, when I need to define an object which i will later fill with data, the

[R] new plotrix and prettyR

2008-11-06 Thread Jim Lemon
Hi all, I'm noting the appearance of new versions of plotrix and prettyR as I found a bug in the brkdn function that messed up the order of value.labels if they had been imported from an SPSS data file. For anyone using brkdn, please upgrade to the new version of prettyR (1.3-5) if you are

Re: [R] wireframe

2008-11-06 Thread Greg Snow
Look at the rotate.wireframe function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Bill

Re: [R] PCA

2008-11-06 Thread Lucke, Joseph F
Neola I'm a bit rusty on this, but I believe you can conduct on singular-value decomposition on the 436 by 518 matrix. The squares of your singular values (max of 436, 518-436 will be zero) will be your eigenvalues, the same as in the PC analysis. The post-eigenvectors will be your

[R] Confidence limits for the parameter of the Poisson distribution

2008-11-06 Thread Hoang Trong Minh Tuan
Hi all, So far I only know one way to get the confidence limit for the Poisson distribution is to use the look-up table given by the 2 parameter (the number of observation x and the confidence level, e.g. 95%) and the table is limit by the maximum number of observations (x = 50). I know the

Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Charles C. Berry
On Thu, 6 Nov 2008, Oliver Bandel wrote: Hello Charles, [snip] dim( as.matrix(replicate(10, sample(x, 3) ) ) ) [1] 3 10 dim( as.matrix(replicate(10, sample(x, 2) ) ) ) [1] 2 10 dim( as.matrix(replicate(10, sample(x, 1) ) ) ) [1] 10 1 = So,

Re: [R] Strang line while plotting failure curves

2008-11-06 Thread Lu, Jiang
Thank you very much, Frank. I installed Design package and tried survplot(). #R code survplot(testfit,time.inc=365.25,xaxt='n',xlim=c(0,1826.25),ylim=c(0,1),conf='none', fun=function(y)1-y,label.curves=list(keys=c('Med','Rev')), abbrev.label=TRUE,n.risk=TRUE) # End of R

[R] Umlaut read from csv-file

2008-11-06 Thread Heinz Tuechler
Dear All! Reading character strings containing an umlaut from a csv-file I find a (to me) surprising behaviour in R 2.8.0, that I did not notice in R 2.7.2. A comparison by == results in FALSE, while grep does find the aggreement. See the example below. The crucial line is x==div 1-2

Re: [R] Confidence limits for the parameter of the Poisson distribution

2008-11-06 Thread Charles C. Berry
On Thu, 6 Nov 2008, Hoang Trong Minh Tuan wrote: Hi all, So far I only know one way to get the confidence limit for the Poisson distribution is to use the look-up table given by the 2 parameter (the number of observation x and the confidence level, e.g. 95%) and the table is limit by the

Re: [R] Confidence limits for the parameter of the Poisson distribution

2008-11-06 Thread Rolf Turner
On 7/11/2008, at 9:26 AM, Hoang Trong Minh Tuan wrote: Hi all, So far I only know one way to get the confidence limit for the Poisson distribution is to use the look-up table given by the 2 parameter (the number of observation x and the confidence level, e.g. 95%) and the table is

[R] nls: Fitting two models at once?

2008-11-06 Thread Martin Ballaschk
Hello, I'm still a newbie user and struggling to automate some analyses from SigmaPlot using R. R is a great help for me so far! But the following problem makes me go nuts. I have two spectra, both have to be fitted to reference data. Problem: the both spectra are connected in some way: the

Re: [R] Strang line while plotting failure curves

2008-11-06 Thread Frank E Harrell Jr
Lu, Jiang wrote: Thank you very much, Frank. I installed Design package and tried survplot(). #R code survplot(testfit,time.inc=365.25,xaxt='n',xlim=c(0,1826.25),ylim=c(0,1),conf='none', fun=function(y)1-y,label.curves=list(keys=c('Med','Rev')),

[R] Estimating mean and standard deviation of lognormal distribution between two points

2008-11-06 Thread Jeremy Beaulieu
This is more of a statistical question. Let's say I have two numbers. One is a lower bound and the other is a point estimate to the right of the lower bound. Now, let's say I want to be able to estimate the mean and standard deviation of a lognormal distribution, where 95% of the density falls

[R] Looking for suggestions on how to debug pvm/snow proc's

2008-11-06 Thread Peter Waltman
Hi All - I'm running a faily long script that uses rpvm snowFT to spawn off multiple processes with the 'clusterApplyFT' function. Specifically, what happens is that the head node generates a number of seed clusters that are then spawned off to the pvm cluster (in this case, nodes on a 4

Re: [R] PCA

2008-11-06 Thread Pedro Mardones
try prcomp instead of princomp On Thu, Nov 6, 2008 at 3:20 PM, Lucke, Joseph F [EMAIL PROTECTED] wrote: Neola I'm a bit rusty on this, but I believe you can conduct on singular-value decomposition on the 436 by 518 matrix. The squares of your singular values (max of 436, 518-436 will be

[R] replacing values in a vector

2008-11-06 Thread Iain Gallagher
Hello list. I have a vector of values: eg head(diff_mirs_list) [1] hsa-miR-26b hsa-miR-26b hsa-miR-23a hsa-miR-27b hsa-miR-29a [6] hsa-miR-29b and I would like to conditionally replace each value in this vector with a number defined in a dataframe: fc Probe ave.fc 1  

  1   2   >