Re: [R] my R code worked well when running the first 1000 lines of R code

2024-06-12 Thread Yuan Chun Ding via R-help
Barradas Sent: Wednesday, June 12, 2024 11:29 AM To: Yuan Chun Ding ; CALUM POLWART Cc: r-help@r-project.org Subject: Re: [R] my R code worked well when running the first 1000 lines of R code Hello, Inline. Às 19: 03 de 12/06/2024, Yuan Chun Ding via R-help escreveu: > I am sorry that I know I sho

Re: [R] my R code worked well when running the first 1000 lines of R code

2024-06-12 Thread Yuan Chun Ding via R-help
fference in the datasets - i.e. numbers, characters or factors as columns. Often import functions guess a column type by reading the first 500/1000 lines. If the data has numbers in column 1 for 1-1000 but on line 1999 has a letter... The data type may vary. On Wed, 12 Jun 2024, 17:28 Yuan Chun D

[R] my R code worked well when running the first 1000 lines of R code

2024-06-12 Thread Yuan Chun Ding via R-help
Hi R users, The following code worked well to summarize four data groups in a dataframe for three variables (t_depth, t_alt_count, t_alt_ratio), 12 columns of summary, see attached. However, after running another 2000 lines of R codes using functions from more than 10 other R libraries, then

[R] how to include if conditions in dplyr filter function

2021-10-26 Thread Yuan Chun Ding via R-help
Hi R users, I thought the follow R code should work, but I got error, Can you fix my code? Thank you, Ding outlier_tcga_MAD3 <- outlier_tcga %>% filter(n_two >0) %>% mutate(freqMAD3_gain2ratio = N_MAD3_gain2/n_two )%>% if (N_MAD3 < 9) {filter(freqMAD3_gain >=1)} else if (N_MAD3 >

[R] boxplots and dotplots by color group 1 and shape group2

2021-09-16 Thread Yuan Chun Ding via R-help
Dear R users, I generated a boxplots in combination of dotplots using the R code below for the attached test file. boxplot(value~score, data = test, outpch = NA, xlab="",ylab="",xaxt='n', cex.lab=1.2, cex.axis=1.2, main="Correlation of SCNV score and SCNV value ") mtext(side=2, "SCNV