Skip to content

Commit

Permalink
Don't don't coerce data.frame to vector when length(columns) == 1
Browse files Browse the repository at this point in the history
This is another fix for #24
  • Loading branch information
mdshw5 authored Mar 30, 2022
1 parent 07e29c1 commit fb1115a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pisces/R/make_expression_matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ rescaleTPM <- function(mat, columns = colnames(mat), rows = 1:nrow(mat), precisi
tpm.scale.factors <- 1e+06/sums.before.norm
scaled_df <- mat
scaled_df[rows, columns] <- data.frame(mapply("*", scaled_df[rows,
columns], tpm.scale.factors))
scaled_df[, columns] <- round(scaled_df[, columns], precision)
columns, drop=F], tpm.scale.factors))
scaled_df[, columns] <- round(scaled_df[, columns, drop=F], precision)
return(scaled_df)
}

Expand Down

0 comments on commit fb1115a

Please sign in to comment.