List all packages available on CRAN to console [duplicate] - r

This question already has answers here:
Names of R's available packages
(4 answers)
Closed 9 years ago.
Would like to get a list of all packages available on CRAN to the windows console. I know that it's gotta be pretty easy because on the windows gui there's an manu option to click install, at which time another menu interface pops up with all packages available on CRAN. If the menu were a function (which it probably is I just don't know what it is) I'd look at the code and figure out how they get that list.
So what you see here: (packages alphabetical LINK) I'd like to get to the console so I can assign it to an object.

?available.packages did not appear in the results of your search? You did search before asking, didn't you? ;-)

Related

Is there a better way to create a GUI in R? [duplicate]

This question already has answers here:
How to create a GUI via R?
(1 answer)
GUI frontend for R script
(3 answers)
Closed 7 months ago.
I am working on a program to analyze and process data for my lab, and I want to make it easier to use for others in my lab who are not as familiar with programming or the R workspace as I am.
Of course the first thing that comes to mind is a GUI, but all the answers and suggestions I have seen are around a decade old at this point and some packages like gWidgets2 do not quite work the same as their predecessors and the newer versions are severly lacking in accessable tutorials for someone like me who only has a mild ammount of experience in R, and no experience designing/working with GUIs.
I already have most of the actual programming done. I just need a GUI element that takes an integer input, and another element that takes a list of strings. Then I need both of those passed to R where it can complete its data arrangement according to what I have already written.

R - Encrypt / Lock Down R Code and Package [duplicate]

This question already has answers here:
Protect/encrypt R package code for distribution [closed]
(2 answers)
Closed 5 years ago.
Is it possible to create an R package such that if I give it to a user, they could run all the functions within the package, but not be able to view any of the source code?
The two possible ways I can think of would be someone opening up the raw .R files within the package, or by typing the function name in the R console to print the R code text. So is there a way to encrypt the files or disable the function print calls for the functions?
Thanks
Luckily, there is no such functionality. If you want to hide your analysis or algorithm, perhaps you could use some proprietary software or write your code in a language which compiles (e.g. C++). Note that all software is reverse-engineerable. It's just a matter of motivation.

R - how to "save" the loaded packages [duplicate]

This question already has answers here:
How to load packages in R automatically?
(4 answers)
Closed 5 years ago.
Recently moved over to R (from MATLAB) - enjoying it…
…However, every time I close R down, I lose all the packages which I loaded in my previous session, and I need to load them up again (I use a Mac OS).
I know there is a way to save the current loaded packages, and have them load up automatically each time I reopen R - I have seen the answer in a few places, but I don't understand the terminology.
Can someone kindly walk me through it… Click by click?
With appreciation
I do it with my .Rprofile file which resides in my default working directory. (I also un-hide my dot-files so it's easy to get at it.) I use Sys.setenv() to maintain the needed PATH environment variable and then load my packages with:
require(lattice)
require(sos)
require(rms)
Demonstrations of how to edit text-files and control of system resources are not really on-topic in SO. You should be able to teach yourself those skills by searching,
It's kind of amusing that one of the most highly voted R questions is closed as not constructive: Expert R users, what's in your .Rprofile? I will admit that technically it probably does violate the stated rules, but you may find it useful, both for the information and to see what sort of question is considered "on- (or off-)topic" in SO.

List of functions of a package [duplicate]

This question already has answers here:
Show names of everything in a package
(4 answers)
Closed 5 years ago.
Is there an easy, friendly way to list all functions of a package without downloading those huge PDFs (package references)? I need this for getting me familiar with the package, finding proper functions etc.
I tried ?rjags but it doesn't do what I expected.
Load the package (for example the carpackage). Then use ls()
ls("package:car")
The closest thing I've been able to find for this is:
help(,"rjags")
The first parameter specifies the searched thing, second one specifies the package. By keeping only the second one, I hope to get all help pages that relate to that package. This is equivalent of
help(package = "rjags")
This might not work in general though, as in ?help the functionality of omitting the first parameter is described as
topic is not optional: if it is omitted R will give
If a package is specified, (text or, in interactive use only, HTML) information on the package, including hints/links to suitable help
topics.

How to disable package without restarting R? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to unload a package without restarting R?
To load a package into R we can go library(.) or require(.). How do I disable a package during a coding session. I want something that's the opposite of require(.).
I think maybe you're looking for detach(package:splines, unload = TRUE).
As you might gather from the comments below, be sure to read carefully the Details section of ?detach to make sure you know exactly what will happen when using this with or without the unload and force arguments.

Resources