Skip to content

Commit

Permalink
unlogtpm and GGsave
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaffy committed Sep 26, 2023
1 parent 021999d commit 2880405
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions R/GGsave.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
GGsave = function(filename, plot = last_plot()) {
GGsave = function(filename,
plot=last_plot(),
width=dev.size()[1],
height=dev.size()[2]) {

device = 'png'
if (str_detect(filename, "pdf")) device = 'pdf'
ggsave(filename = filename, plot = plot, width = dev.size()[1], height = dev.size()[2], device = device)
ggsave(filename=filename,
plot=plot,
width=width,
height=height,
device=device)
}
4 changes: 2 additions & 2 deletions R/unlogtpm.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ unlogtpm = function(m, bulk = F) {
if (has_dim(m)) m = as.matrix(m)
if (bulk) x = 1
else x = 10
(2^m) * x - 1
#x * (2^(m) - 1)
#(2^m) * x - 1
(2^(m) - 1) * x
}

2 changes: 1 addition & 1 deletion man/grouped_rowcenter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2880405

Please sign in to comment.