ProvTools / encapsulator

GNU General Public License v3.0
2 stars 1 forks source link

Edit the package list so that only essential packages are output with --code #15

Open MKLau opened 7 years ago

tfjmp commented 7 years ago

That needs changes to RDataTracker to know what packages are used in each operations. See https://github.com/End-to-end-provenance/RDataTracker/issues/331

MKLau commented 7 years ago

This feature is still not working for me. I run the following and libraries are still included in the output .R file produced that are not actually needed.

encapsulator --code messycode.R fig2_biplot.png

MKLau commented 7 years ago
library("vegan")
library("txtplot")
data.16 <- read.csv("projects/2016/july_biomass_survey.csv")
data.v1.1to4 <- data.16[, 1:4]
data.v1.1to4 <- data.v1.1to4 * 2
data.v1.1to4.2 <- data.v1.1to4 * 2
data.16[, 1:4] <- data.v1.1to4.2
png("figures_2/fig2_biplot.png")
plot(data.16[, 2:3])
dev.off()
MKLau commented 7 years ago

It should be:

data.16 <- read.csv("projects/2016/july_biomass_survey.csv")
data.v1.1to4 <- data.16[, 1:4]
data.v1.1to4 <- data.v1.1to4 * 2
data.v1.1to4.2 <- data.v1.1to4 * 2
data.16[, 1:4] <- data.v1.1to4.2
png("figures_2/fig2_biplot.png")
plot(data.16[, 2:3])
dev.off()
tfjmp commented 7 years ago

That needs changes to RDataTracker to know what packages are used in each operations. See End-to-end-provenance/RDataTracker#331

MKLau commented 7 years ago

Sorry, this said it was fixed this morning. Maybe there was a github glitch.