Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getValue = function(pos, start, end, genes) {
- temp = filter(pos, start <= pos, pos <= end)
- small=genes[genes$check %in% temp,]
- justgenes=small$char
- justpos=small$pos
- outlist=list("pos"=justpos,"genes"=justgenes)
- return(outlist)
- }
- x=seq(1,100,by=5)
- y=seq(3,100,by=5)
- comb=cbind(x,y)
- comb=as.data.frame(comb)
- check=c(1,1,1,2,3,3,2,3,61,61,62,62)
- chars=c("A","B","C","D","E","F","G","H","I","J","K","L")
- table=cbind(check,genes)
- output=sapply(check, getValue, start=x, end=y, genes=table)
- Error in match.arg(method) : 'arg' must be NULL or a character vector
- getValue = function(pos, start, end, genes) {
- pos=as.character(pos)
- temp = filter(pos, start <= pos, pos <= end)
- small=genes[genes$check %in% temp,]
- justgenes=small$char
- justpos=small$pos
- outlist=list("pos"=justpos,"genes"=justgenes)
- return(outlist)
- }
- Error in UseMethod("filter") :
- no applicable method for 'filter' applied to an object of class "character"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement