Open ZeroDawn0D opened 4 years ago
The following code snippet:
library(rco); code1 <- paste( "f1 <- function(x){", "1", "2", "3", "4", "5", "}", sep = "\n" ) code2 <- paste( "f2 <- function(x){", "1;", "2;", "3;", "4;", "5;", "}", sep = "\n" ) cat(opt_dead_expr(list(code1))$codes[[1]]); cat("\n"); cat(opt_dead_expr(list(code2))$codes[[1]]);
returns an output of:
f1 <- function(x){ 5 } f2 <- function(x){ 1; 2; 3; 4; 5; }
The function does not optimize lines which end with semicolons. Please look into this issue as general users may not be aware of it without explicit testing
The following code snippet:
returns an output of:
f1 <- function(x){ 5 } f2 <- function(x){ 1; 2; 3; 4; 5; }
The function does not optimize lines which end with semicolons. Please look into this issue as general users may not be aware of it without explicit testing