opasnet: Importing files from Opasnet

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Functions for downloading files from Opasnet Media Wiki environments.

Usage

1
2
3
opasnet.data(filename, wiki = "", unzip = "")
opasnet.csv(filename, wiki = "", unzip = "", ...)
opasnet.page(pagename, wiki = "")

Arguments

filename

Path to file in Opasnet after the "images/" part.

pagename

Name of a page in Opasnet.

wiki

Name of the Opasnet wiki: "opasnet_en" for en.opasnet.org, "opasnet_fi" for fi.opasnet.org or "heande" for heande.opasnet.org (accessible only within Heande wiki).

unzip

Name of the file in the package (if compressed using zip).

...

Excess arguments will be passed to read.table function when downloading csv-file.

Details

These functions make it easy to download Opasnet files for being used in R. Required path (filename) for file must be resolved using the corresponding Media Wiki. Big data files should always be compressed before uploading to Opasnet. Using the unzip-argument makes it easy to download and directly use any zip-compressed files. opasnet.page downloads wiki pages using getURL from RCurl.

See also: http://en.opasnet.org/

Value

opasnet.data

Returns the file data as is.

opasnet.csv

Returns data.frame parsed from csv file.

opasent.page

Returns the web page as a single string.

Author(s)

E. Happonen einari.happonen@thl.fi, T. Rintala teemu.rintala.a@gmail.com

See Also

read.table

Examples

1
2
3
4
5
## Not run: 
opasnet.csv("4/49/Test.zip", wiki = "opasnet_fi", unzip = 'ejpop.csv', sep=';')
opasnet.data("c/cc/Test_bugs_model.txt", wiki = "opasnet_en")

## End(Not run)

OpasnetUtils documentation built on May 2, 2019, 12:39 p.m.