Re: [R] to run an older version of R on my machine

2019-05-23 Thread Alfredo Cortell
, although I have read that it doesn't work in every platform. I don't know about ubuntu. I would advise you to try it anyhow. Good luck with that! All the best, Alfredo El jue., 23 may. 2019 a las 21:38, Bogdan Tanasa () escribió: > Dear all, > > if you could help me please with a s

Re: [R] Convert a character to numeric

2019-04-09 Thread Alfredo Cortell
just letters put together, therefore R can't understand their meaning, and returns NA. I believe that your best shot is to go with gsub, so that you translate your "string letters" to "string numbers", and then you can do as.numeric no problem Try this vec<-c("1"

[R] R: Structuring data for Correspondence Analysis

2019-04-04 Thread Alfredo
Hi Michael et al, I solved by myself simply running the code below. Thanks anyway for the answers Alfredo t <- read.csv(file="C:\\Temp\\radio_survey.csv", header=TRUE, sep=",") t1 <- table(t$Preference, t$Sex) t2 <- table(t$Preference, t$Age) t3

[R] Structuring data for Correspondence Analysis

2019-03-29 Thread Alfredo
Hi, I am very new to r and need help from you to do a correspondence analysis because I don't know how to structure the following data: Thank you. Alfredo library(ca,lib.loc=folder) table <- read.csv(file="C:\\Temp\\Survey_Data.csv", header=TRUE, sep="

[R] DNAbin

2018-10-16 Thread Alfredo Cortell
Dear all, Is it possible to convert a data frame with variables (columns) and the number of persons for each variable at a given time at the day (rows) to DNAbin object type, so that I can calculate Tajima's divergence? I've been trying, but I just can't find the way. Thank you very much, V1 V2

[R] DNAbin

2018-10-16 Thread Alfredo Cortell
Hola, buenos dias. Escribo porque me gustaría saber si puedo convertir un data frame que consiste en variables (indicadas por columnas) y en filas (el número de personas que tienen cada variable en determinada hora del dia.) en un tipo de objeto DNAbin para poder calcular la divergencia de Tajima.

[R] Problems update version

2018-03-06 Thread carlos alfredo barron gallardo
Hello. I'm trying to install bioconductor software on my ubuntu linux computer system. I've installed already the latest R version but when trying to install any semiconductor package, I can't. After write the command on R, it says that I have to upload my R to the new version but I have already

[R] R: How to prune using holdout data

2017-02-27 Thread Alfredo
ty my question. Best, Alfredo -Messaggio originale- Da: Therneau, Terry M., Ph.D. [mailto:thern...@mayo.edu] You will need to give more detail of exactly what you mean by "prune using a validation set". THe prune.rpart function will prune at any value you want, what I

[R] How to prune a tree using a validation set

2017-02-25 Thread Alfredo
I'd like to use a different data ( validation) set for pruning my classification tree. Unfortunately there aren't arguments to get this in prune.rpart(). Any suggestions? Thanks! Alfredo [[alternative HTML version deleted]] _

Re: [R] x-axis labelling

2013-02-04 Thread Alfredo Tello
Hi Dave, Thanks for your reply. I can't reproduce the last line of code your code. The ifelse argument throws back an error saying it was not used. A On Fri, Feb 1, 2013 at 10:56 PM, David Winsemius wrote: > > On Feb 1, 2013, at 9:30 AM, Alfredo Tello wrote: > > Hi Folk

[R] x-axis labelling

2013-02-01 Thread Alfredo Tello
is=0.8,cex=0.8) This labels all the tickmarks in my barplot, which is the default behavior. I would like to label every other tick mark in the barplot --> 1,3,5,7 and so on. Thank you very much for your help! All the best, A -- Alfredo Tello (http://alfredotello.com) Sustainable Aquacult

Re: [R] how to delete all classes & variables in current & previously saved history?

2012-02-19 Thread Alfredo Alessandrini
rm(list=ls()) 2012/2/19 sagarnikam123 > i have variables stored in previous history,next time i log in,& load > previous history,i want to use same variable name for using other values, > & i don't know exactly how many are they ? & their names also.. > > How to delete all variable created in cu

Re: [R] How to change the order of columns in a data frame?

2012-02-17 Thread Alfredo Alessandrini
Hi Joel, to replace the colnames: colnames(dataframe <- )gsub("X","",colnames(dataframe)) to order by colnames: dataframe <- dataframe[,colnames(dataframe)] Alfredo 2012/2/17 Joel Fürstenberg-Hägg > Dear all, > > I have a data frame in which the co

Re: [R] Writing output into a file

2012-02-12 Thread Alfredo Alessandrini
Hi, could you paste the results? Alfredo 2012/2/12 Suranga Kasthurirathne : > Hi everyone, > > I'm an R newbie working with the poLCA module. I achieved my target without > having to bother anyone, but It seems that I've got stuck at the last > minute. > > My pro

Re: [R] averaging rows based on string¿?

2011-07-24 Thread alfredo
Hi Dennis, That works brilliantly! Thanks a lot! All the best, A -- View this message in context: http://r.789695.n4.nabble.com/averaging-rows-based-on-string-tp3687689p3690145.html Sent from the R help mailing list archive at Nabble.com. __ R-help

[R] averaging rows based on string¿?

2011-07-23 Thread alfredo
Hi Folks, Ran into something I'd really like to do in R simply/elegantly, but my R - coding skills seem surpassed. This is the thing. Imagine the following data: labs<-c("abcdef","abcgg","tgthefdk","tgtijuel","tgtnjmoi","gbnt","dlift") dat<-c(0.5,0.25,1,2,16,0.250,4) dframe<-data.frame(labs,dat)

[R] cluster by unique value

2011-07-18 Thread Alfredo Alessandrini
0.1 4 [6,] 0.546000 2-0.1 5 [7,] 0.546000 3-0.1 2 [8,] 0.846000 2-0.1 3 [9,] 0.246000 2-0.1 1 [10,] 0.846000 2-0.4 6 Thanks in advance, Alfredo __ R-help@r-proje

[R] coefficients lm of data.frame

2011-07-07 Thread Alfredo Alessandrini
354 intercept3 coeff3 10 -1.1011662 0.02894731 intercept3 coeff3 11 -0.4098710 -0.01231322 intercept3 coeff3 12 1.1511811 -0.63923140 intercept3 coeff3 Thanks in advance, Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

[R] Size argument in sample function

2011-06-17 Thread alfredo
Hi All, I'd like to randomly sample a vector N times, where each successive random sample increases in size. I have realised that the function sample does not take vectors for arguments. For example, x<-rnorm(20,0,1) sample(x,c(1,2,3)) ## will only return one random sample of size 1. The trick

Re: [R] "invalid times argument in rep function"

2011-06-03 Thread alfredo
Problem solved..it turned out there was a "NA" in one of the rows which was truncating "rep".. thanks anyway -- View this message in context: http://r.789695.n4.nabble.com/invalid-times-argument-in-rep-function-tp3570746p3571024.html Sent from the R help mailing list archive at Nabbl

[R] R: join tables in R

2011-05-05 Thread Roccato Alfredo (UniCredit)
Thanks a lot to Steve Lianoglou and Peter Savicky for their help! Alfredo -Messaggio originale- Da: Steve Lianoglou [mailto:mailinglist.honey...@gmail.com] > I'd to match-merge 2 tables in such a manner that I keep all the rows in > table 1, but not the rows that are in b

[R] join tables in R

2011-05-04 Thread Roccato Alfredo (UniCredit)
I'd to match-merge 2 tables in such a manner that I keep all the rows in table 1, but not the rows that are in both table 1 and 2. Thank you for your help, Alfredo > master <- data.frame(ID=2001:2011) > train <- data.frame(ID=2004:2006) > valid <- ??? in this example

[R] extract element from list by rownames

2011-04-12 Thread Alfredo Alessandrini
Hi, I've a list of list. I want to extract an element by the rownames. I can extract it by: data[[1]][[1]][[4]][1] But I want to exctract it by a command like this: data[[1]][["B0"]][["smac"]][["cont"]][1] It's possible? Thanks, Alfredo

Re: [R] Very simple question

2011-04-08 Thread Alfredo Alessandrini
> Exist any function to associated with paste make this result more > automatically. you can try with gsub. Alfredo 2011/4/8 Ronaldo Reis Junior : > Hi, > > I have a very simple doubt. > > Look: > >> teste <- c("A","B","C") >

[R] round number

2011-03-26 Thread Alfredo Alessandrini
Hi, > a <- 4 > a*0.2 [1] 0.8 ok!! Is there a method to obtain this: > a*0.2 [1] 0.80 I need to round the number also with the zero. Thanks in advance, Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] Hello!

2011-02-27 Thread Rios,Alfredo Arturo
ut their generosity and kindness to the other list members. Alfredo On Sun, 27 Feb 2011 08:27:00 -0800, Mark Knecht wrote: > On Sat, Feb 26, 2011 at 10:11 PM, Bert Gunter wrote: >> Are you a fan of James Joyce? Is the Caps key on your keyboard broken? >> >> -- Bert > &

[R] y-axis slightly cut-off after printing plots to tiff

2011-02-16 Thread alfredo
Hi Folks, I'm hoping someone could help me a bit. I have plotted the following: ### tiff("plot7.tiff",units="cm",width=15,height=36,res=700) layout(matrix(c(1,2,3,4,5,6),3,1),widths=lcm(c(15)),heights=lcm(c(12,12,12)),respect=TRUE) plot.t1<-plot(data.dist

Re: [R] "statistic" term in boot function

2010-09-24 Thread alfredo
Hi and thanks for your replies (I'm sorry to be a bit late..), I think I might be being a bit thick on this, but I truly would not be asking if I had not already gone through the manuals and examples in the web. I just want to be sure I got Jorge's example. the function is a generic functio

[R] "statistic" term in boot function

2010-09-22 Thread alfredo
Hi There, Just a question regarding the function that is specified to boot (I have read the help, the manual and online examples.). The description of boot says that the second argument of "statistic" (non parametric bootstrap) must be a vector of indices, frequencies or weights which def

[R] best model cp mallow

2010-09-22 Thread Alfredo Alessandrini
r2") > maxadjr(adjr) 12312 0.713 0.56 ok... but whit Cp method don't work > adjr <- leaps(x,y,method="Cp") > maxadjr(adjr) Errore in order(l$a) : l'argomento 1 non è di tipo vector Thanks, Alfredo -- View this message in context: http://r.78

Re: [R] for loop help please!

2010-09-10 Thread alfredo
Thanks A LOT guys for your posts and replying despite the fact that it might have been a bit hard to get my point (I apologise for the latter). Josh's and Jim's examples worked perfectly. A loop was certainly not the most elegant solution. What I want to do (for those who asked) is re-generate

[R] for loop help please!

2010-09-10 Thread alfredo
Hi Everyone, I have a 2-dim data.matrix(e.g., table1) in which row1 specifies a range of values. row2 - rown specify the number of times I want to replicate each corresponding value in row1. I can do this with the following function: rep(c(table1[1,]),c(table1[X,])) #where X would go from 2 -

[R] compare three values

2010-08-30 Thread Alfredo Alessandrini
Hi, I've three values. What is the best method to choice the lowest values with an if function? example: a = 3 b = 1 c = 5 if (lowest(a,b,c) is a) {} if (lowest(a,b,c) is b) {} if (lowest(a,b,c) is c) {} Thanks, Al

[R] gsub

2010-08-06 Thread Alfredo Alessandrini
Hi, I'm using gsub, but I've a problem. > print(i) [1] "piante_venere.csv" > gsub("\\.csv$", "", i) [1] "piante_venere" > gsub("^piante_", "", i) [1] "venere.csv" Can I combine the two expressions?

[R] aggregate by column names

2010-02-18 Thread Alfredo Alessandrini
0.214 0.2099 Thanks, Alfredo __ 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] sum column by colnames

2010-01-21 Thread Alfredo Alessandrini
t;> m <- merge(data1, data2, by = 0, all = TRUE, sort = FALSE) >> sapply(unique(union(names(data1), names(data2))), function(n)Reduce('+', >> m[grep(n, names(m))])) > > On Wed, Jan 20, 2010 at 10:59 AM, Alfredo Alessandrini > wrote: >> Hi, >> >

[R] sum column by colnames

2010-01-20 Thread Alfredo Alessandrini
0 0.000 Thanks, Alfredo __ 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] question on runif

2010-01-20 Thread Alfredo
Oops forgot to include the radius ang<-runif(200,0,2*pi) x<-cos(ang)*.1 +0.4 y<-sin(ang)*.1 +0.8 plot(x,y) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang Amadeus Sent: Wednesday, January 20, 2010 5:26 AM To: r-help Subjec

Re: [R] question on runif

2010-01-20 Thread Alfredo
ang<-runif(20,0,2*pi) x<-cos(ang) +0.4 y<-sin(ang) +0.8 plot(x,y,ylim=c(-3,3),xlim=c(-3,3)) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang Amadeus Sent: Wednesday, January 20, 2010 5:26 AM To: r-help Subject: [R] question

[R] problem with unmatched quotes

2009-12-14 Thread Alfredo Alessandrini
Hi, I've a problem with unmatched quotes with a bash script within a R script: > system("awk 'NR>2 {FS=" > ";print$1","$2","$3","$4","$5","$6","$7","$8","$9","

[R] time series - month value

2009-12-01 Thread Alfredo Alessandrini
What's the better method for obtain monthly value? Thanks, Alfredo __ 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 commente

[R] aggregate data.frame

2009-11-09 Thread Alfredo Alessandrini
.1370867 60.01 6 0.1122784 70.6358819 -12.1333488 82.41 7 0.4493264 8 -7.9629934 -15.6282544 60.01 8 0.1932665 9 -7.9962383 -7.1998453 62.01 9 0.1982783 10 -17.3282497 5.6302896 67.01 10 NA 11 -3.2569414 5.0152500 77.51 12 0.3724666 Thanks, Alfredo _

[R] sum two columns with same value

2009-10-17 Thread Alfredo Alessandrini
Hi, I've two dataframe: > snag_totale AREA snag_ha 12 1.628128 23 10.274249 34 2.778503 45 73.764307 57 12.015985 > log_totale AREAlog_ha 11 22.29846 22 17.16889 33 48.80377 44 144.18996 55 70.30962 66 61.81850 77 13.24876 > How c

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread Alfredo
? Hi, The following script will run without asking me anything. $ Rscript plot.R > x=1:10 > y=1:10 > X11() > plot(x,y) > par(ask=T) > Regards, Peng On Sun, Sep 6, 2009 at 11:55 AM, RIOS,ALFREDO ARTURO wrote: > Hi Peng > > I think this is what you are looking for

Re: [R] How to pop up the graphics window from Rscript?

2009-09-06 Thread RIOS,ALFREDO ARTURO
t(x,y) __ 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. -- RIOS,ALFREDO A

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread RIOS,ALFREDO ARTURO
Hi Peng I think this is what you are looking for par(ask=T) Alfredo On Sun Sep 06 12:52:31 EDT 2009, Peng Yu wrote: Hi, In 'example(barplot)' running in R, I see 'Hit to see next plot:', then R waits for my input. I am wondering how to wait for a user response

Re: [R] Sequence generation

2009-08-29 Thread RIOS,ALFREDO ARTURO
I think should work rep(c(1,2,3),10) Alfredo On Sat Aug 29 15:14:15 EDT 2009, njhuang86 wrote: Hey guys, I was wondering how to create this sequence: 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3... with the '1, 2, 3' repeated over 10 times. Also, is there a simple method to genera

Re: [R] Heteroscedasticity in binary logit models

2009-08-11 Thread Alfredo
You might want to check vif in the Design package. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tomas Zelinsky Sent: Tuesday, August 11, 2009 3:20 PM To: r-help@r-project.org Subject: [R] Heteroscedasticity in binary logit models

Re: [R] random between two values

2009-08-06 Thread Alfredo
sample(c("a","b"))[1] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of damien landais Sent: Thursday, August 06, 2009 11:02 AM To: R-help@r-project.org Subject: [R] random between two values Hi, I would obtain a random value between

Re: [R] first value...

2009-06-23 Thread Alfredo Alessandrini
nc[154] [1] NA I must obtain only the first value, in this case: inc[82]. Regards, Alfredo 2009/6/23 Henrique Dallazuanna > > Try this: > >  which(diff(is.na(inc)) < 0) > > On Tue, Jun 23, 2009 at 11:00 AM, Alfredo Alessandrini > wrote: >> >> Hi, &

Re: [R] first value...

2009-06-23 Thread Alfredo Alessandrini
Now is ok...thanks. Alfredo 2009/6/23 Alfredo Alessandrini : > I've the NA value also between the value of the vector: > >> inc >  [1]        NA        NA        NA        NA        NA        NA        NA >  [8]        NA        NA        NA        NA        NA    

[R] first value...

2009-06-23 Thread Alfredo Alessandrini
tain the position of first value of the vector... In this case is 82. > inc[82] [1] 13.09550 Regards, Alfredo __ 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.

[R] vector and NA

2009-06-23 Thread Alfredo Alessandrini
I extract a vector without the NA value? Regards, Alfredo __ 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, sel

[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

[R] count value

2008-09-11 Thread Alfredo Alessandrini
NA X1006402F X1006406F X1006407F X1006408F X1006421F X1006605F 1NA65NANANA45 > How can I count the field =! NA?? Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

[R] add string

2008-07-31 Thread Alfredo Alessandrini
Hi, How can I join two string? frequency = 15 I want join the number frequency with a string. Alfredo __ 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

Re: [R] NA value

2008-06-27 Thread Alfredo Alessandrini
>for (i in files_rwl) { > thisfile <- get(i) > thisfile[is.na(thisfile)] <- 0 > assign(i, thisfile) > } > > It's likely that you could condense it, but using the long form makes it > clear what's happenin

Re: [R] NA value

2008-06-27 Thread Alfredo Alessandrini
> Don't use a loop for this. Do this. I need to use a loop... I've many data. Alfredo __ 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-g

[R] NA value

2008-06-27 Thread Alfredo Alessandrini
i)] <- 0) > ls() [1] "cimfasy_rwl" "files_rwl" "files.rwl" "i" "rocquce_rwl" > > cimfasy_rwl [1] 0 > Thanks in advance, Alfredo __ R-help@r-project.org mailing list https://stat.

Re: [R] a loop....

2008-06-25 Thread Alfredo Alessandrini
d column. This isn't a problem, I utilise only the data that start from a definite start date. Alfredo __ 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/po

[R] a loop....

2008-06-25 Thread Alfredo Alessandrini
gt; files_rwl [1] "cimfasy_rwl" "rocquce_rwl" > for (i in files_rwl) assign(gsub("\\_rwl$", "", i), i[is.na(i) ] <- 0) > ls() [1] "cimfasy" "cimfasy_rwl" "files_rwl" "files.rwl" "i" [6] "roc

[R] loop with files

2008-06-24 Thread Alfredo Alessandrini
gt; class(a) [1] "data.frame" This loop import all the files rwl in a single data.frame ( a ). Can I import a single files to a single data.frame? like this: for (i in files) {cimfasy <- read.rwl(i,header=0)} for (i in files) {rocquce <- read.rwl(i,header=0)} Thanks in advance

Re: [R] colnames of a column

2008-06-20 Thread Alfredo Alessandrini
> have you read the docs? Yes, I'm reading the manual "An Introduction to R".. > start with ?`[` Ok...I haven't read it. Thanks. Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] colnames of a column

2008-06-19 Thread Alfredo Alessandrini
quot;0028002F" "0028013F" "0028032F" Ok > colnames(rwl[,1]) NULL why?? I expect: "0028002F" Thanks in advance, Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] inverse cumsum

2008-06-18 Thread Alfredo Alessandrini
3 1.78 1995 1.15 0.92 1.50 0.97 0.60 0.00 1996 0.00 0.00 0.00 0.00 0.00 0.00 thanks... Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] inverse cumsum

2008-06-18 Thread Alfredo Alessandrini
2008/6/18 Alfredo Alessandrini <[EMAIL PROTECTED]>: > I've a matrix like this: > > 1985 1.38 1.27 1.84 2.10 0.59 3.47 > 1986 1.05 1.13 1.21 1.54 0.21 2.14 > 1987 1.33 1.21 1.77 1.44 0.27 2.85 > 19

[R] inverse cumsum

2008-06-18 Thread Alfredo Alessandrini
1.89 0.60 0.87 1995 1.13 1.04 1.19 1.52 1.13 1.78 Can I utilise a cumsum inverse? from 1995 to 1985? Thank you, Alfredo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] add a row to a data frame

2007-09-27 Thread Alfredo Alessandrini
> > # set X's colnames to match d's > colnames(X) <- colnames(d) > > # Now rbind() > rbind(d, X) thanks, it's work... Alfredo [[alternative HTML version deleted]] __ R-help@r-project.org maili

[R] add a row to a data frame

2007-09-27 Thread Alfredo Alessandrini
NA NANANANA If I try to add X to d, I've an error like this: rbind(X,d) Errore in match.names(clabs, names(xi)) : names do not match previous names Why? Best wishes, Alfredo [[alternative HTML version deleted]] __ R-h

[R] data frame

2007-09-17 Thread Alfredo Alessandrini
0 0 > length (a) [1] 9 I've a questions... There is a function for show the lenght of single observation? > (a) [1] 12 Best Wishes, Alfredo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list http

[R] add a row...

2007-09-14 Thread Alfredo Alessandrini
ed? print (b) a b 1 14 21 2 21 45 3 14 23 4 4 11 Best Wishes, Alfredo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.

[R] replace NA value with 0

2007-09-14 Thread Alfredo Alessandrini
wishes, Alfredo [[alternative HTML version deleted]] __ 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

[R] loop function

2007-09-13 Thread Alfredo Alessandrini
Hi, If I have this values: 21 23 14 58 26 How can I sum the values by a progression like this: (21) (21 + 23) (21 + 23 + 14) (21 + 23 + 14 + 58) (21 + 23 + 14 + 58 + 26) (21 + 23 + 14 + 58 + 26) I've try with the function "loop" Best Wishes, Alfredo [[a