Re: [R] how to replace values in a named vector

2020-09-14 Thread Rui Barradas
Hello, Please Ana, post data in dput format. And the expected output too. Hope this helps, Rui Barradas Às 17:37 de 14/09/20, Ana Marija escreveu: sorry not replace with NA but with empty string for a name, for example for example this: geneSymbol["Ku8QhfS0n_hIOABXuE"] Ku8QhfS0n_hIOABXuE

Re: [R] how to replace values in a named vector

2020-09-14 Thread Ana Marija
sorry not replace with NA but with empty string for a name, for example for example this: > geneSymbol["Ku8QhfS0n_hIOABXuE"] Ku8QhfS0n_hIOABXuE "MACC1" would go when I subject it to > geneSymbol["Ku8QhfS0n_hIOABXuE"] Ku8QhfS0n_hIOABXuE On Mon, Sep 14, 2020 at 11:35 AM Ana Marija

[R] how to REPLACE VALUES in a dataframe

2012-02-05 Thread Valerie Moore
Hi, I have two data frames (u and v). u   coe nam 1   0 Time 2   0    Poten 3   0   AdvExp 4   0    Share 5   0   Change 6   0 Accounts 7   0 Work 8   0   Rating v   coeff    enter 1 0.7272727 Accounts 2 0.322 Time 3 0.0500123    Poten I want to update the values

Re: [R] how to REPLACE VALUES in a dataframe

2012-02-05 Thread Jim Holtman
indx - match(u$nam, v$enter, nomatch = 0) u$coe[indx != 0] - v$coeff[indx] Sent from my iPad On Feb 5, 2012, at 15:45, Valerie Moore vmoore2...@yahoo.com wrote: Hi, I have two data frames (u and v). u coe nam 1 0 Time 2 0Poten 3 0 AdvExp 4 0Share 5 0

Re: [R] _: how to replace values in x by means in subgroups created in ...(not loops)

2011-07-28 Thread Eugeniusz Kałuża
: r-help@r-project.org Onderwerp: [R] how to replace values in x by means in subgroups created in ... (not loops) # Dear all, # how to replace values in x by means in subgroups created in ... # replace only these values where y=0 in continous sequence # replace by mean calculated locally

[R] how to replace values in x by means in subgroups created in ... (not loops)

2011-07-27 Thread Eugeniusz Kałuża
# Dear all, # how to replace values in x by means in subgroups created in ... # replace only these values where y=0 in continous sequence # replace by mean calculated locally for each subgroup created by # continous sequence of 0,0,0 in parallel y vector, i.e. # where there is continous

Re: [R] how to replace values in x by means in subgroups created in ... (not loops)

2011-07-27 Thread ONKELINX, Thierry
: [R] how to replace values in x by means in subgroups created in ... (not loops) # Dear all, # how to replace values in x by means in subgroups created in ... # replace only these values where y=0 in continous sequence # replace by mean calculated locally for each subgroup created

[R] How to replace values?

2009-04-30 Thread Suhaila Zainudin
Hello all, I have a list of genes as follows (A) Number  GeneName 0 YAR003W 1 YAR007C 2 YAR008W 3 YBL035C 4 YBL111C 5 YBL112C And I have a list of gene interactions as follows (B) 0 - 1 1 - 5 3 - 4 2 - 3 I want to replace

Re: [R] How to replace values?

2009-04-30 Thread Sigbert Klinke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, If the coding would start at 1 rather than 0 then +1's in the penultimate line could be eliminated. Sigbert - --- gene - c(YAR003W, YAR007C, YAR008W, YBL035C, YBL111C, YBL112C) print(gene) to - c(0,1,3,2) # to - c(1,2,4,3) from