similar to: replace elements of a data frame

Displaying 20 results from an estimated 10000 matches similar to: "replace elements of a data frame"

2012 Feb 24
2
data frame manipulation with condition
Dear list, n00b question, but still can't find any easy answer. Here is a df: > df<-data.frame(cbind(x=c("AA","BB","CC","AA"),y=1:4)) > df x y 1 AA 1 2 BB 2 3 CC 3 4 AA 4 I want to modify this df this way : if df$x=="AA" then df$y=df$y*10 if df$x=="BB" then df$y=df$y*25 and so on with other conditions. TY for any
2012 Feb 09
2
ifelse
Hello, I need to print a screen message after a test. >list<-c("10","1","100","10") >ifelse(all(list %in% c(1,10,100)==TRUE),cat("YES\n"),cat("NO\n")) YES Error in ifelse(all(l %in% c(1, 10, 100) == TRUE), cat("YES\n"), cat("NO\n")) : replacement has length zero I have the correct answer, YES, but with
2012 Feb 27
1
compare two data frames with same columns names but of different dimensions
Dear List, I want to compare and return the rows which are NOT in the two data frames. Classic methods don't work as the df have NOT the same dimensions. Here are one example of my df: reported <- structure(list(Product = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 3L, 4L, 5L, 5L), .Label = c("Cocoa", "Coffee C", "GC", "Sugar No 11", "ZS"),
2012 Feb 27
2
compare two data frames of different dimensions and only keep unique rows
Dear list, I am still struggling with something that should be easy: I compare two data frames with a lot of common rows and want to keep only rows that are NOT in both data frames, unique. Here are an example of these data frame. reported <- structure(list(Product = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 3L, 4L, 5L, 5L), .Label = c("Cocoa", "Coffee C", "GC",
2012 Feb 24
1
data frame manipulation with conditions
Dear list, n00b question, but still can't find any easy answer. Here is a df: > df<-data.frame(cbind(x=c("AA","BB","CC","AA"),y=1:4)) > df x y 1 AA 1 2 BB 2 3 CC 3 4 AA 4 I want to modify this df this way : if df$x=="AA" then df$y=df$y*10 if df$x=="BB" then df$y=df$y*25 and so on with other conditions. TY for any
2010 May 21
1
select elements in a list
Dear group, Here is a list : l <- list("100415", "100416", "100419", "100420", "100421", "100422", "100423", "100426", "100427", "100428", "100429", "100430", "100503", "100504", "100505", "100506", "100507",
2015 Aug 24
3
Build optimized R : openblas, MKL, ATLAS
On Mon, Aug 24, 2015 at 11:29 AM, Bj?rn-Helge Mevik <b.h.mevik at usit.uio.no> wrote: > arnaud gaboury <arnaud.gaboury at gmail.com> writes: > >> - Intel MKL: this is part of Intel Parallel Studio and is a paid >> software. Now, there is the MKL package distributed by >> Revolutionanalytics, but I am not certain how this can be distributed >> for free. Is
2012 Feb 27
1
Ubuntu jaunty - R can't be install
Dear helpers, I would like to install R on a computer with Ubuntu Jaunty. Unfortunately, Jaunty does not appear in any CRAN mirror website I have tried (France, Canada, Italy, Germany). Could you give me any mirror website allowing installation on Jaunty?or could you give me a procedure to passby this problem? Thanks for your help, Best regards, Marine Veyssi?re
2015 Dec 05
1
R_PROFILE_USER
On Sat, Dec 5, 2015, 9:39 PM peter dalgaard <pdalgd at gmail.com> wrote: > On 05 Dec 2015, at 18:07 , arnaud gaboury <arnaud.gaboury at gmail.com> wrote: > > In my shell environment, I have set a path to R_PROFILE_USER. The > file, Rprofile.R, is a collection of small hacks. > > I want to build rstudio-server from source. Best is to $ unset > R_PROFILE_USER
2015 Sep 04
2
Build R with MKL and ICC
On Wed, 2015-09-02 at 20:49 +0200, arnaud gaboury wrote: > On Wed, Sep 2, 2015 at 7:35 PM, arnaud gaboury <arnaud.gaboury at gmail.com> wrote: > > After a few days of reading and headache, I finally gave a try at > > building R from source with Intel MKL and ICC. Documentation and posts > > on this topic are rather incomplete, sometime fantasist et do not give > >
2010 May 26
5
(no subject)
Dear group, Here is my data frame: > dput(u) structure(list(DESCRIPTION = structure(c(2L, 5L, 6L, 7L, 9L, 11L, 12L, 15L, 14L, 16L, 1L, 10L, 3L, 4L, 13L, 8L, 17L), .Label = c("COFFEE C Jul/10", "COPPER May/10", "CORN Jul/10", "CORN May/10", "COTTON NO.2 Jul/10", "CRUDE OIL miNY May/10", "GOLD Jun/10", "HENRY HUB
2015 Sep 04
1
Build R with MKL and ICC
On Fri, Sep 4, 2015, 9:24 AM Bj?rn-Helge Mevik <b.h.mevik at usit.uio.no> wrote: arnaud gaboury <arnaud.gaboury at gmail.com> writes: > After a few days of reading and headache, I finally gave a try at > building R from source with Intel MKL and ICC. Documentation and posts > on this topic are rather incomplete, sometime fantasist et do not give > much explanations about
2010 Apr 15
1
sum rows in a data.frame...solution
Found this solution. It is maybe not the most elegant way, but it does the job. > a=as.data.frame(substr(lme$DESCRIPTION,1,14)) > colnames(a)=c("DESCRIPTION") > lme=as.data.frame(c(a,lme[,2:3])) > lme DESCRIPTION CLOSING.PRICE POSITION 1 PRIMARY NICKEL 25,755.7100 0 2 PRIMARY NICKEL 25,760.8600 0 3 PRM HGH GD ALU 2,415.9000 0
2010 Apr 23
3
substract start from the end of the vector
Dear group, Here is my df : df <- structure(list(DESCRIPTION = c("PRM HGH GD ALUMINIUM USD 09/07/10 ", "PRM HGH GD ALUMINIUM USD 09/07/10 ", "PRIMARY NICKEL USD 04/06/10 " ), CREATED.DATE = structure(c(18361, 18361, 18325), class = "Date"), QUANITY = c(-1L, 1L, 1L), CLOSING.PRICE = c("2,415.90", "2,415.90",
2016 Oct 13
2
SSL error
On Thu, Oct 13, 2016 at 8:48 AM Christian Kivalo <ml+dovecot at valo.at> wrote: > > > > > Am 13. Oktober 2016 08:41:06 MESZ, schrieb arnaud gaboury < > arnaud.gaboury at gmail.com>: > > >I run dovecot + postfix as my email server. Everything is working as > > >expected, but I see an error in the dovecot logs: > > > > > >lmtp(7331):
2015 Sep 08
1
Build rpm package for R-MKL
On Tue, Sep 8, 2015 at 7:58 PM, Tom Callaway <tcallawa at redhat.com> wrote: > On 09/08/2015 01:51 PM, arnaud gaboury wrote: >> So no idea why, at this part of the process, icc is not found. Weird, >> as building manually from source (no rpmbuild) is OK. > > Hm. Is icc in a normal place that is in a standard PATH (e.g. /usr/bin > or /bin) or are you overriding PATH?
2010 May 11
2
Regex and gsub
Dear group, Here is my df : df3 <- structure(list(DESCRIPTION = c("COPPER May/10", "COTTON NO.2 Jul/10", "CRUDE OIL miNY May/10", "GOLD Jun/10", "ROBUSTA COFFEE (10) Jul/10", "SOYBEANS Jul/10", "SUGAR NO.11 Jul/10", "SUGAR NO.11 May/10", "WHEAT Jul/10", "SPCL HIGH GRADE ZINC USD",
2015 Sep 30
1
Build R with MKL and ICC
On Tue, Sep 29, 2015 at 8:11 PM, Nathan Kurz <nate at verse.com> wrote: > Hi Arnaud -- > > I'm glad it's working for you. I'm not sure I understand your final > answer. Are you saying that the version I posted worked for you as > given, or that you had to remove some of the other options? I say it works perfectly when using the single dynamic library (lmkl_rt):
2015 Aug 24
1
Build optimized R : openblas, MKL, ATLAS
On Mon, Aug 24, 2015 at 1:42 PM, Dirk Eddelbuettel <edd at debian.org> wrote: > > On 24 August 2015 at 11:43, arnaud gaboury wrote: > | On Mon, Aug 24, 2015 at 11:29 AM, Bj?rn-Helge Mevik > | <b.h.mevik at usit.uio.no> wrote: > | > arnaud gaboury <arnaud.gaboury at gmail.com> writes: > | > > | >> - Intel MKL: this is part of Intel Parallel Studio
2010 Apr 23
2
read.csv data frame thousands separator
Dear group, Here is my df, trades1 : trades1 <- structure(list(Instrument.Long.Name = c("CORN", "CORN", "CORN", "CORN", "CORN", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS", "STANDARD LEAD USD", "STANDARD LEAD USD", "SPCL