From 4002354b9d4e0bb25eabb380eda8e8da843d5e7e Mon Sep 17 00:00:00 2001 From: Kent Johnson Date: Thu, 11 Jan 2018 10:07:06 -0500 Subject: [PATCH] Fix to work with tibbles (hms-dbmi/UpSetR#80) --- R/Helper.funcs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/Helper.funcs.R b/R/Helper.funcs.R index af9f8bc..492d18d 100644 --- a/R/Helper.funcs.R +++ b/R/Helper.funcs.R @@ -2,7 +2,7 @@ FindStartEnd <- function(data){ startend <- c() for(i in 1:ncol(data)){ - column <- data[, i] + column <- data[[i]] column <- (levels(factor(column))) if((column[1] == "0") && (column[2] == "1" && (length(column) == 2))){ startend[1] <- i @@ -21,7 +21,7 @@ FindStartEnd <- function(data){ } } for(i in ncol(data):1){ - column <- data[ ,i] + column <- data[[i]] column <- (levels(factor(column))) if((column[1] == "0") && (column[2] == "1") && (length(column) == 2)){ startend[2] <- i