Hi Rui,
I use the code to fix my problem:
try$newcol <- gsub(" NA", "", try$newcol)
But, I'll try your solution later.
Thank you for your help.
Kai On Wednesday, June 2, 2021, 02:08:18 PM PDT, Kai Yang via R-help
wrote:
Hi List,
I use paste function to concatenate 3 character columns tog
Hello,
Something like this?
df1 <- read.table(text = "
NA NA NA
NA NA Adenocarcinoma
NA Other NA")
df1
apply(df1, 1, function(x){
if(all(is.na(x))){
NA_character_
}else{
paste(x[!is.na(x)], collapse = "")
}
})
And please configure your e-mail client not to post in HTML format.
Hi List,
I use paste function to concatenate 3 character columns together.
when I run table to see that, I found 3 categories. How can I write script to
trim NA in 2nd and 3rd group and set the first one as NA?
Thanks,
Kai
NA NA NA
NA NA Adenocarcinoma
NA Other NA
[[alternative HTML ver
"
In some cases there may be one missing package."
That should reae
In some cases there may be more than one missing package.
On Tue, 1 Jun 2021 at 14:19, John Kane wrote:
>
> I have added this to the R Help mailing list as it increases your
> chances of getting a helpful response.
>
> That err
Hello Jim,Your example works well.Thank you for your help,Kai
On Tuesday, June 1, 2021, 04:59:09 PM PDT, Kai Yang via R-help
wrote:
Hi List,
I have a column MMR in a data frame proband_crc2. The column contents missing
value and + (means positive).
I need to replace all missing value
Hi Kai,
Maybe this will help:
proband_crc2<-data.frame(MMR=rep(c(NA,"+"),3))
proband_crc2
proband_crc2$MMR[is.na(proband_crc2$MMR)]<-"-"
proband_crc2
Jim
On Wed, Jun 2, 2021 at 9:59 AM Kai Yang via R-help wrote:
>
> Hi List,
> I have a column MMR in a data frame proband_crc2. The column content
Hi all,
A new package is now available on CRAN: RweaveExtra 1.0-0, which provides
"Sweave Drivers with Extra Tricks Up their Sleeve".
Call me an old timer, but I always stuck to Sweave ever since it introduced me
to literate programming. I just prefer the simplicity of the system.
Now, I deve
7 matches
Mail list logo