Home > Back-end >  Two-column output of setdiff() in R
Two-column output of setdiff() in R

Time:12-23

My work is with proteomics analysis, and I'm using R for the first time.

So my input is in .txt and is a list of protein names, as I use the setdiff() function in a specific set of data instead of giving me a single column of proteins is giving me a double-column output. This didn't happen when I did the same thing with other data sets.

I already tried to look for a solution online and in R help but I couldn't find the same situation.

My lines are: v1=readLines("C:\\Users\\ACER\\Documents\\V4\\Duo\\ECC_CC.txt") v2=readLines("C:\\Users\\ACER\\Documents\\V4\\Duo\\ECC_CSC.txt") vlist <- list(v1, v2) names(vlist) <- c("Cell Line","CSC") setdiff(v1,v2)

I even tried to switch the order on the input and edit the .txt files to see if the problem was with them.

CodePudding user response:

Welcome to R and Stack Overflow!

  • Related