Open source Package of R? [duplicate] - r

This question already has answers here:
How can I view the source code for a function?
(13 answers)
Closed 8 years ago.
I used the packages "tm", "lda" and "topicmodels" in R.
Is there open source code for these packages (in other language(s)) so that I could modify the core??

Every package on CRAN (the main R archive) has a link to the source code. e.g.
http://cran.r-project.org/web/packages/lda/index.html
lists:
Reference manual: lda.pdf
Package source: lda_1.3.2.tar.gz
MacOS X binary: lda_1.3.2.tgz
Windows binary: lda_1.3.2.zip
Old sources: lda archive
download the package source, extract it (7-zip will extract tar.gz archives on Windows, I think) and there will be the source code.

Related

I am trying to load data into r and am not sure what this error is referring to [duplicate]

This question already has answers here:
Rcpp package doesn't include Rcpp_precious_remove
(2 answers)
Closed 1 year ago.
I am trying to read a file into r and I keep getting this error. All of my libraries are installed and loaded. It is a spreadsheet with 2 sheets and I only want data from the second sheet.
read.xlsx(dataUrl, sheet = 2)
Error in getChildlessNode(xml = workbookRelsXML, tag = "Relationship") :
function 'Rcpp_precious_remove' not provided by package 'Rcpp'
You have to install the Rcpp package first:
install.packages('Rcpp')
library('Rcpp')
read.xlsx(dataUrl, sheet = 2)

Unable to install GWASpoly to R [duplicate]

This question already has answers here:
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
(18 answers)
Closed 2 years ago.
How can I install R package GWASpoly. I have been trying from last week with bundle of different methods. but all went useless. Always showing this msg:
package ‘GWASpoly’ is not available (for R version 3.3.3)
Can any body help me out in this?
i) Go to this website: http://potatobreeding.cals.wisc.edu/software/
ii) Download the package
iii) In R, install using the following command: install.packages("~/Downloads/GWASpoly_1.3.tar.gz", repos = NULL, type = "source")

Can I generate comments using roxygen2 without building an R package? [duplicate]

This question already has answers here:
Possible to create Rd help files for objects not in a package?
(7 answers)
Closed 7 years ago.
I need to generate documentation for a collection of R programs. Unfortunately, building a package based on the source code is not an option (I know how to do that, and I have already experimented with RStudio, roxygen2, and packages, and it works like a charm). Can I use roxygen2 to to generate documentation from the R source code without building a package in a way similar to how doxygen works with C++? If not, are there other options for documenting R code that do not rely on packages?
If your only after the documentation, devtools::document() will build the documentation files without building the package.

View all availble table/dataset inside a zipped package [duplicate]

This question already has answers here:
Reading data in R from package
(2 answers)
Closed 8 years ago.
I am new to world of R.I have loaded a dataset using following command
install.packages("gcookbook")
library(gcookbook)
gcookbook have few datasets.what is the command in R to see all those data sets inside it?
You can see all datasets in a package by running data(package = "gcookbook") or simply data() if you want to see all currently available datasets ordered by package. You can read more about this command if you type ?data

Building a package so that it loads other packages automatically in R [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to properly use functions from other packages in a R package
load data set automatically
I've built an R package and am now testing it. It requires several packages like scatterplot3d, gdata, etc.
How can I get those packages to load automatically, when someone loads my package?
Thanks!
Edit Re Comments: I've already set imports in the Description and I've set the namespaces file. I know this works because the examples I put in work when I do R CMD Check. However, if I just load up R, type library(mypackage) it gives me an error.
Edit: Solved, I moved the packages I had in the imports section to the depends section. Thank you!

Resources