what do you mean "on database"? Do you mean a dataset that is loaded into R by default? Or do you really mean on a database that you would need to access through some sort of database language?
Hi folks,
I can't figure out using help.search to find the name of the dataset on database. If it is NOT the right tool please advise which tool shall I use? TIA
B.R.
Stephen L
what do you mean "on database"? Do you mean a dataset that is loaded into R by default? Or do you really mean on a database that you would need to access through some sort of database language?
data() will give you a list of all the datasets currently loaded.
Once you load a package the datasets that come with that package will be shown with data() as well.
If you just want to know what datasets come with a package before loading (or even after loading it) you can use data(package = "package_name_here").
If you want to list all the available datasets for all packages (even if they aren't loaded yet) you can use data(package = .packages(all.available = TRUE))
> data(package = "DNase")> data() # DNase is there.Code:Error in .find.package(package, lib.loc, verbose = verbose) : there is no package called 'DNase'
> data(package = "BOD")> data() # BOD is there.Code:Error in .find.package(package, lib.loc, verbose = verbose) : there is no package called 'BOD'
> data(package = .packages(all.available = TRUE))It works. ThanksCode:Warning messages: 1: In data(package = .packages(all.available = TRUE)) : datasets have been moved from package 'base' to package 'datasets' 2: In data(package = .packages(all.available = TRUE)) : datasets have been moved from package 'stats' to package 'datasets'
B.R.
satimis
Hi folks,
I still haven't resolved to find from which package a dataset comes.
e.g.
If I want to find which package provides "MedUnits" what command shall I run?
TIA
B.R.
satimis
Try
At the top of the help page it will tell you which package it comes from.Code:?MedUnits
Ah. If you don't have the dataset loaded yet then I think you would need the double question marks.
|
|