Entering edit mode
12 months ago
Bioinfonext
▴
470
Hi all,
Could anyone please help how to remove col names from Meth file which are present in DF file.
DF <- read.table("DIFF.txt", as.is=T, na.strings="NA", check.names=FALSE)
head(DF)
x
1 NSE.1.0096
2 NSE.1.0100
3 NSE.1.0121
library(readr)
Meth <- read_csv("betas_1.csv", col_types = cols(Chromosome = col_skip())
head(Meth, 10) [,1:5]
A tibble: 10 × 5
ID NSE.1.0093 NSE.1.0095 NSE.1.0096 NSE.1.0097
<chr> <dbl> <dbl> <dbl> <dbl>
1 cg26928153 0.939 0.941 0.923 0.924
2 cg16269199 0.900 0.902 0.853 0.872
3 cg13869341 0.936 0.926 0.856 0.924
4 cg24669183 0.898 0.901 0.957 0.864
Please stop asking basic R/programming questions and use Google to learn the underlying concepts. A simple search is the way to start: https://www.google.com/search?q=r+dataframe+exclude+columns
Also, your code is not reproducible - You read data into
Meth
and then select columns fromdatMeth
.