search for: lucam1968

Displaying 20 results from an estimated 30 matches for "lucam1968".

2018 Apr 30
3
How to visualise what code is processed within a for loop
...ns. R?s performance working with data frames has improved since then, so I really don?t know if it would make a difference for your task. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 Lab cell 925-724-7509 From: Luca Meyer <lucam1968 at gmail.com> Date: Monday, April 30, 2018 at 8:08 AM To: Rui Barradas <ruipbarradas at sapo.pt> Cc: "MacQueen, Don" <macqueen1 at llnl.gov>, array R-help <r-help at r-project.org> Subject: Re: [R] How to visualise what code is processed within a for loop Hi Rui Than...
2018 Apr 22
3
How to dynamically add variables to a dataframe
Hi, I am a bit rusty with R programming and do not seem to find a solution to add a number of variables to my existing dataframe. Basically I need to add n=dim(d1)[1] variables to my d0 dataframe and I would like them to be named V1, V2, V3, ... , V[dim(d1)[1]) When running the following code: for (t in 1:dim(d1)[1]){ d0$V[t] <- 0 } all I get is a V variable populated with zeros... I am
2011 Aug 28
4
How do I get a weighted frequency table?
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110828/d35f51a1/attachment.pl>
2012 Aug 06
5
regexpr with accents
Hello, I have build a syntax to find out if a given substring is included in a larger string that works like this: d1$V1[regexpr("some text = 9",d1$V2)>0] <- 9 and this works all right till "some text" contains standard ASCII set. However, it does not work when accents are included as the following: d1$V1[regexpr("some t?xt = 9",d1$V2)>0] <- 9 I have
2018 Apr 30
0
How to visualise what code is processed within a for loop
...our task. > > > > -Don > > > > -- > > Don MacQueen > > Lawrence Livermore National Laboratory > > 7000 East Ave., L-627 > > Livermore, CA 94550 > > 925-423-1062 > > Lab cell 925-724-7509 > > > > > > *From: *Luca Meyer <lucam1968 at gmail.com> > *Date: *Monday, April 30, 2018 at 8:08 AM > *To: *Rui Barradas <ruipbarradas at sapo.pt> > *Cc: *"MacQueen, Don" <macqueen1 at llnl.gov>, array R-help < > r-help at r-project.org> > *Subject: *Re: [R] How to visualise what code is proces...
2018 Apr 22
0
How to dynamically add variables to a dataframe
...our d0 or d1 > n <- 3 > d0 <- data.frame(a=runif(5),b=runif(5)) # here's the suggested code > d1 <- cbind(d0, matrix(0,nrow(d0),n)) > colnames(d1)[1:n + ncol(d0)] <- paste("V",1:n,sep="") HTH, Eric On Sun, Apr 22, 2018 at 11:13 AM, Luca Meyer <lucam1968 at gmail.com> wrote: > Hi, > > I am a bit rusty with R programming and do not seem to find a solution to > add a number of variables to my existing dataframe. Basically I need to add > n=dim(d1)[1] variables to my d0 dataframe and I would like them to be named > V1, V2, V3, .....
2012 Nov 30
3
Reading .gsheet within R
Hello R-experts, I would like to know if there is a solution to read files with extension .gsheet directly into R - see http://www.fileinfo.com/extension/gsheet for more info on this file format. Thank you, Luca Mr. Luca Meyer www.lucameyer.com R 2.15.1 Mac OS X 10.8.2 [[alternative HTML version deleted]]
2018 Apr 24
4
How to visualise what code is processed within a for loop
Hi, I am trying to debug the following code: for (i in 1:10){ t <- paste("d0$V",i,sep="") t <- ifelse(regexpr(d1[i,1],d0$X0)>0,1,0) } and I would like to see what code is actually processing R, how can I do that? More to the point, I am trying to update my variables d0$V1 to d0$V10 according to the presence or absence of some text (contained in the file d1)
2018 Apr 30
0
How to visualise what code is processed within a for loop
...e., L-627 >>>> Livermore, CA 94550 >>>> 925-423-1062 >>>> Lab cell 925-724-7509 >>>> >>>> >>>> ?On 4/24/18, 12:30 AM, "R-help on behalf of Luca Meyer" < >>>> r-help-bounces at r-project.org on behalf of lucam1968 at gmail.com> wrote: >>>> >>>> Hi, >>>> >>>> I am trying to debug the following code: >>>> >>>> for (i in 1:10){ >>>> t <- paste("d0$V",i,sep="") >>>>...
2018 Apr 28
2
How to visualise what code is processed within a for loop
...ry >>> 7000 East Ave., L-627 >>> Livermore, CA 94550 >>> 925-423-1062 >>> Lab cell 925-724-7509 >>> >>> >>> ?On 4/24/18, 12:30 AM, "R-help on behalf of Luca Meyer" < >>> r-help-bounces at r-project.org on behalf of lucam1968 at gmail.com> wrote: >>> >>> ???? Hi, >>> >>> ???? I am trying to debug the following code: >>> >>> ???? for (i in 1:10){ >>> ?????? t <- paste("d0$V",i,sep="") >>> ?????? t <- ifelse(regexpr(d1[i,1...
2018 Apr 24
0
How to visualise what code is processed within a for loop
...l, d0$X0) (I haven't checked it, but it looks,like it will do the trick. It returns a logical vector, so if you need integers, then use an as.numeric() around the right hand side. Or hope that R does type conversion for you when you need it) HTH Bob On 24 April 2018 at 09:30, Luca Meyer <lucam1968 at gmail.com> wrote: > Hi, > > I am trying to debug the following code: > > for (i in 1:10){ > t <- paste("d0$V",i,sep="") > t <- ifelse(regexpr(d1[i,1],d0$X0)>0,1,0) > } > > and I would like to see what code is actually processing R...
2012 Aug 30
4
Leading plus in numeric fields
Hello R experts, I have go this data frame: 'data.frame': 1 obs. of 20 variables: $ Anno : chr "PREVISIONI VS TARGET" $ OreTot: num 41 $ GioTot: logi NA $ OrGTot: logi NA $ OreCli: num 99 $ GioCli: logi NA $ OrGCli: logi NA $ OreFor: num -27 $ GioFor: logi NA $ OrGFor: logi NA $ OreOrt: num -18 $ GioOrt: logi NA $ OrGOrt: logi NA $ OreSpo: num -6 $ GioSpo: logi
2018 Apr 28
2
How to visualise what code is processed within a for loop
...; -- > Don MacQueen > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > Lab cell 925-724-7509 > > > ?On 4/24/18, 12:30 AM, "R-help on behalf of Luca Meyer" < > r-help-bounces at r-project.org on behalf of lucam1968 at gmail.com> wrote: > > Hi, > > I am trying to debug the following code: > > for (i in 1:10){ > t <- paste("d0$V",i,sep="") > t <- ifelse(regexpr(d1[i,1],d0$X0)>0,1,0) > } > > and I would like to see w...
2018 Apr 25
0
How to visualise what code is processed within a for loop
...4 They are not really what it is intended for. -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 Lab cell 925-724-7509 ?On 4/24/18, 12:30 AM, "R-help on behalf of Luca Meyer" <r-help-bounces at r-project.org on behalf of lucam1968 at gmail.com> wrote: Hi, I am trying to debug the following code: for (i in 1:10){ t <- paste("d0$V",i,sep="") t <- ifelse(regexpr(d1[i,1],d0$X0)>0,1,0) } and I would like to see what code is actually processing R, how...
2018 Apr 28
0
How to visualise what code is processed within a for loop
...ence Livermore National Laboratory >> 7000 East Ave., L-627 >> Livermore, CA 94550 >> 925-423-1062 >> Lab cell 925-724-7509 >> >> >> ?On 4/24/18, 12:30 AM, "R-help on behalf of Luca Meyer" < >> r-help-bounces at r-project.org on behalf of lucam1968 at gmail.com> wrote: >> >> Hi, >> >> I am trying to debug the following code: >> >> for (i in 1:10){ >> t <- paste("d0$V",i,sep="") >> t <- ifelse(regexpr(d1[i,1],d0$X0)>0,1,0) >>...
2012 Feb 22
1
Multiple lines for each record: how do I handle that
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120222/a28536ba/attachment.pl>
2011 Feb 09
1
Adding labels into lattice's barchart
*** APOLOGIZES FOR THOSE READING THE LIST THROUGH NABBLE THIS WAS ALREADY POSTED THERE BUT NOT FORWARDED TO THE LIST FOR SOME UNKNOWN REASON *** I have a dataset that looks like: $ V1: factor with 4 levels $ V2: factor with 4 levels $ V3: factor with 2 levels $ V4: num (summing up to 100 within V3 levels) $ V5: num (nr of cases for each unique combination of V1*V2*V3 levels) Quite new to
2017 Dec 29
3
Writing text files out of a dataset
Hello, I am trying to run the following syntax for all cases within the dataframe "data" d1 <- data[1,c("material")] fileConn<-file("TESTI/d1.txt") writeLines(d1, fileConn) close(fileConn) I am trying to use the for function: for (i in 1:nrow(data)){ d[i] <- data[i,c("material")] fileConn<-file("TESTI/d[i].txt")
2010 Dec 19
3
monthly median in a daily dataset
Hello, I have a multi-year dataset (see below) with date, a data value and a flag for the data value. I want to find the monthly median for each month in this dataset and then plot it. If anyone has suggestions they would be greatly apperciated. It should be noted that there are some dates with no values and they should be removed. Thanks Emily > print ( str(data$flow$daily) )
2010 Dec 09
1
how to use diff() with different variables?
Hi, I first should say I am new to R. I have searched without success the R-archives to see if I could find an answer to what I am about to ask you. My dataset is like: x fine 1 A 2010-12-09 07:57:33 2 B 2010-12-09 08:05:00 3 C 2010-12-08 20:42:00 ... that is: 'data.frame': 3 obs. of 2 variables: $ x : Factor w/ 3 levels "A","B","C":