Re: [R] How to hold a value(Mean sq) with a string

2008-03-06 Thread Jorge Iván Vélez
Hi Felipe, Try this dfr <- read.table( textConnection("percentQ Efficiency 1.5650.0125 1.94 0.0213 0.8760.003736 1.0270.006 1.5360.0148 1.5360.0162 2.6070.02 1.4560.0157 2.16 0.0103 1.6980.0196 1.64 0.0098684 1.8140.0183 2.3940.0107 2.4690.

Re: [R] mean and sd with number of values?

2008-03-06 Thread Jorge Iván Vélez
Hi Martin, Try x=c(NA,NA,rnorm(50),NA) sum(!is.na(x)) HTH Jorge On Thu, Mar 6, 2008 at 11:41 AM, Martin Kaffanke <[EMAIL PROTECTED]> wrote: > Hi there, > > When i do > > mean(fl[1:20], na.rm=T) > sd(fl[1:20], na.rm=T) > > I get 20 Results, but now I'd like to know from how many numbers my me

Re: [R] Try to save as PDF: font family not found in PostScript font database

2008-03-06 Thread Jorge Iván Vélez
Hi Michael, I had the same problem using R 2.6.0. Not it's fixed in newer versions. HTH Jorge On Thu, Mar 6, 2008 at 8:05 AM, michael watson (IAH-C) < [EMAIL PROTECTED]> wrote: > Hi > > I'm using 2.6.0 on Windows XP SP2. I realise I'm on an old version, > please tell me if the problem is fix

Re: [R] t.test & p-Value

2008-03-05 Thread Jorge Iván Vélez
Hi Eleni, Check *"Computing Thousands of Test Statistics Simultaneously in R" *in http://stat-computing.org/newsletter/v181.pdf Other alternative could be the multtest package. HTH Jorge On Wed, Mar 5, 2008 at 8:55 AM, Eleni Christodoulou <[EMAIL PROTECTED]> wrote: > On Wed, Mar 5, 2008 a

Re: [R] paired or one-sample t-Test

2008-03-04 Thread Jorge Iván Vélez
Hi Keizer, Look at *"Computing Thousands of Test Statistics Simultaneously in R" *by Holger Schwender and Tina Müller in http://stat-computing.org/newsletter/v181.pdf HTH Jorge On Tue, Mar 4, 2008 at 6:05 AM, Keizer_71 <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > I am having a real hard tim

Re: [R] exercise

2008-03-03 Thread Jorge Iván Vélez
Hi Flo, Ckeck ?agrep HTH. Jorge On 3/3/08, Flo <[EMAIL PROTECTED]> wrote: > > Hi, > > How can I solve this problem? > I have to find in a list all the words which have the same letters, but > one must be different. > Ex "pain": rain, pine... > > I hope you will understand my poor english! Tha

[R] How to read HUGE data sets?

2008-02-27 Thread Jorge Iván Vélez
Dear R-list, Does somebody know how can I read a HUGE data set using R? It is a hapmap data set (txt format) which is around 4GB. After read it, I need to delete some specific rows and columns. I'm running R 2.6.2 patched over XP SP2 using a 2.4 GHz Core 2-Duo processor and 4GB RAM. Any suggestion

Re: [R] R console closes on its own

2008-02-20 Thread Jorge Iván Vélez
Hi Judith, If I undestand, see ?savePlot and try this xyplot(dat$a~dat$b) savePlot(filename="C:\\yourname",type=c("pdf"),device=dev.cur()) I hope this helps. Jorge On 2/20/08, Judith Flores <[EMAIL PROTECTED]> wrote: > > Dear R-experts, > > I am running a script that has the following > s

[R] Replacing columns in a data frame using a previous condition (SOLVED)

2008-02-14 Thread Jorge Iván Vélez
Dear R-list, Thanks a lot for your help. Thanks to Jim, Dimitris and Phil. It's exactly what I needed to do. Jorge On 2/14/08, Jorge Iván Vélez <[EMAIL PROTECTED]> wrote: > Dear R-list, > > I'm working with a data frame which dimensions are > > > dim(GERU)

Re: [R] Replacing columns in a data frame using a previous condition

2008-02-14 Thread Jorge Iván Vélez
14 14 > 5 5 5 15 15 > 6 6 6 16 16 > 7 7 7 17 17 > 8 8 8 18 18 > 9 9 9 19 19 > 10 10 10 20 20 > > > > > On 2/14/08, Jorge Iván Vélez <[EMAIL PROTECTED]> wrote: > > Dear R-list, > > > > I'm working with a data frame which

[R] Replacing columns in a data frame using a previous condition

2008-02-14 Thread Jorge Iván Vélez
Dear R-list, I'm working with a data frame which dimensions are > dim(GERU) [1] 3468 318 and looks like > GERU[1:10,1:10] ped ind par1 par2 sex sta rs7696470 rs7696470.1 rs1032896 rs1032896.1 1 USA5854 200 2 1 4 4 1 1 2 USA5854 3

Re: [R] Levene's test for homogeneity of variances (befor using ANOVA)

2008-02-14 Thread Jorge Iván Vélez
Hi Kes, Try > library(help=car) > ?levene.test or "levene" in http://www.rseek.org/ (first hit). I hope this helps, Jorge On 2/14/08, Kes Knave <[EMAIL PROTECTED]> wrote: > > Dear all > > I have tried to find this function in R, but don't find it by searching in > the help function. > > Anyb

Re: [R] plot each column of a matrix or dataframe versus x in a single plot

2008-02-14 Thread Jorge Iván Vélez
Hi Thomas, Ckeck ?matplot. Here's a simple example: # Data set x=runif(100)# Axis x1=rnorm(100,25,2) # Variable x_i x2=rnorm(100,10,1) x3=rnorm(100,15,4) x4=rnorm(100,30,4) DATA=cbind(x,x1,x2,x3,x4) # Plot matplot(x,DATA[,2:5],col=1:5,pch=1:5) I hope this helps.

Re: [R] summary statistics

2008-02-12 Thread Jorge Iván Vélez
Hi Stephen, Try tapply(DATA$mgl,DATA$RM,summary) # DATA is a data.frame I hope this helps. Jorge On 2/12/08, stephen sefick <[EMAIL PROTECTED]> wrote: > > below is my data frame. I would like to compute summary statistics > for mgl for each river mile (mean, median, mode). My apologies in

Re: [R] how to extract characters from a character string

2008-02-08 Thread Jorge Iván Vélez
Hi Weidong, It works, but I'm completely sure could be more efficient: # x is a string DELETE=function(x){ x=as.character(x) res=NULL; for(i in 1:nchar(x)) res=c(res,substr(x,i,i)) pos=which(res=="?"|res==" ") # Detecting "?" and " " res2=res[(pos[1]+1):(pos[2]-1)] k=length(res2) res3=NULL; fo

Re: [R] putting mean and sd on a histogram

2008-02-08 Thread Jorge Iván Vélez
Hi David, Try abline(v=c(m-stanD,m+stanD),col=2,lty=2) I hope this helps, Jorge On 2/8/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > I would like to put the mean and + / - the standard deviation as lines on > the x axis of a histogram. My attempts using the histogram function h

Re: [R] remove the missing value,NA

2008-02-08 Thread Jorge Iván Vélez
Hi Mohamed, May be it's not the best way, but you can try > w=c(1,4,5,2,NA,4,5,1,NA) > w[-which(is.na(w))] [1] 1 4 5 2 4 5 1 I hope this helps. Jorge On 2/8/08, mohamed nur anisah <[EMAIL PROTECTED]> wrote: > > I have two sets of interval data.Below are my two dataset. In these > dataset, t

Re: [R] writing a function

2008-02-08 Thread Jorge Iván Vélez
Hi Mohamed, Just change return(w[i,j]) by return(w), and return(y[i]) by return(y). I hope this helps, Jorge On 2/8/08, mohamed nur anisah <[EMAIL PROTECTED]> wrote: > > Dear lists, > > I'm in my process of learning of writing a function. I tried to write a > simple functions of a matrix and

Re: [R] how to calculate chisq value in R

2008-02-07 Thread Jorge Iván Vélez
?pchisq Jorge On 2/7/08, jinjin <[EMAIL PROTECTED]> wrote: > > > for example, an expression such as chisq(df=1,ncp=0) ? > > thanks > > > -- > View this message in context: > http://www.nabble.com/how-to-calculate-chisq-value-in-R-tp15338943p15338943.html > Sent from the R help mailing list arc

Re: [R] Sampling

2008-02-05 Thread Jorge Iván Vélez
Hi Judith, Also you can try NSIM=20 # Number of samples res=apply(matrix(rep(rep(LETTERS[1:2],12),NSIM),ncol=NSIM),2,sample) res I hope this helps. Jorge Iván Vélez On 2/5/08, Daniel Dunn <[EMAIL PROTECTED]> wrote: > > sample(rep(LETTERS[1:2],12), 24, replace=F) > > ---

Re: [R] Concatenate a Variable

2008-02-01 Thread Jorge Iván Vélez
Hi Carla, Try paste("VAR: ",a,sep="") Jorge On 2/1/08, Carla Rebelo <[EMAIL PROTECTED]> wrote: > > Good morning! > > I do not speak English very well and so I will try to explain the best I > can. I have this: > > > tabela[,1] > [1] a a b b a c b a c c c c c > Levels: a b c > > >unique(tabela[

[R] 95% confidence and prediction intervals for linear mixed models

2008-01-30 Thread Jorge Iván Vélez
Hi R-users, >From the last week I've been working fitting a linear mixed model with random intercept and fixed shape (model4) for a data set with 37 individuals measured over time, using lme package. Results are at the end of this message. The outcome is score and the covariate is age. My questio