Clearing predefined values in variables
0
0
Entering edit mode
@humberto_munoz-10903
Last seen 8.4 years ago

I am getting some errors in my code below since the variables v and w have a predefined values. The current sizes of my data sets are DarkAerobic (2810 and 4) and DarkAnaerobic (2815 and 4).  The merging dataset z must have also 4 columns not 11. Any suggestion to clear the predefined values for v and w will be appreciated.

  

> a1<-read.csv("~/Documents/Normalization-R/DarkAerobic.csv", header = TRUE, sep ="\t")
> a2<-read.csv("~/Documents/Normalization-R/DarkAnaerobic.csv", header = TRUE, sep ="\t")

> v<- data.frame(gene_id = a1['GeneID'], count = a1['ReadCount'], length = a1['Length'])
Error in `[.data.frame`(a1, "GeneID") : undefined columns selected
> w<- data.frame(gene_id = a2['GeneID'], count = a2['ReadCount'], length = a2['Length'])
Error in `[.data.frame`(a2, "GeneID") : undefined columns selected
> dim(v)
[1] 3618    5
> View(v)
> dim(w)
[1] 3622    7
> View(w)
> z<-merge(v, w, by = "GeneID", all = TRUE)
> ## v<-merge(x, y, by = "GeneID")
> dim(z)
[1] 3622   11

variables • 832 views
ADD COMMENT
0
Entering edit mode

This question may or may not have anything to do with Bioconductor, but it's really hard to say because you are being so mysterious. If it's your code, why do you need any help changing anything? Perhaps it would be helpful if you said exactly what you are trying to do, people might be able to help you.

ADD REPLY

Login before adding your answer.

Traffic: 576 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6