We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would love to be able to see original formatting and comments for every package I install.
This can be done by installing from source with "--with-keep.source" :
"--with-keep.source"
install.packages(package, type = "source", INSTALL_opts = c("--with-keep.source"))`
But installing from source takes forever in some cases, so I don't love it as a default.
Would there be a way to install from binary, yet fetch the code from the .tar.gz. and have the code available at a minor installation cost?
Nowadays disk space is cheap enough, it doesn't make a lot of sense anymore to strip the source of IMO, so this might even be the default?
The text was updated successfully, but these errors were encountered:
Seems like this is possible:
src <- "f <- function() 1+\n2+\n3" eval(parse(text = src, keep.source = FALSE)) e <- new.env() eval(parse(text = src, keep.source = TRUE), envir = e) f2 <- e$f f #> function () #> 1 + 2 + 3 f2 #> function() 1+ #> 2+ #> 3 #> <environment: 0x13b9dd048>
f <- compiler::cmpfun(f) .Internal(bodyCode(f)) #> <bytecode: 0x13ccb33d0> attr(f, "srcref") <- attr(f2, "srcref") .Internal(bodyCode(f)) #> <bytecode: 0x13ccb33d0> f #> function() 1+ #> 2+ #> 3 #> <bytecode: 0x13ccb33d0>
Created on 2025-03-08 with reprex v2.1.0
I don't know where the source code is stored in the installed package, though.
It is not really clear to me how we would add the source references to all functions (S4, R6 class methods, etc.) systematically.
Sorry, something went wrong.
No branches or pull requests
I would love to be able to see original formatting and comments for every package I install.
This can be done by installing from source with
"--with-keep.source"
:But installing from source takes forever in some cases, so I don't love it as a default.
Would there be a way to install from binary, yet fetch the code from the .tar.gz. and have the code available at a minor installation cost?
Nowadays disk space is cheap enough, it doesn't make a lot of sense anymore to strip the source of IMO, so this might even be the default?
The text was updated successfully, but these errors were encountered: