import_FAO: Importing data from Epidemium

Description Usage Arguments Value Warning Examples

Description

These functions allow you to import FAO, World Bank, ILO data and training data from your computer or directly from the internet

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import_FAO(path = getwd(), filename = "Faostat_Data.csv", fromURL = FALSE,
  url = "http://qa.epidemium.cc/data/epidemiology_dataset/fao_data/Faostat_Data.csv",
  colstokeep = 1:10, fill.Ethiopia = T)

import_WB(path = getwd(), filename = "WorldBank_Data.csv",
  fromURL = FALSE,
  url = "http://qa.epidemium.cc/data/epidemiology_dataset/world_bank_data/WorldBank_Data.csv",
  colstokeep = 1:10)

import_ILO(path = getwd(), filename = "Ilostat_Data.csv", fromURL = FALSE,
  url = "http://qa.epidemium.cc/data/epidemiology_dataset/ilo_data/Ilostat_Data.csv",
  colstokeep = 1:10)

import_training(path = getwd(), filename = "training.csv",
  fromURL = FALSE,
  url = "http://qa.epidemium.cc/data/incidence_dataset/2017-10-10_dataset_core/training.txt",
  colstokeep = 1:10, cancercode = "C18")

Arguments

path

The path where the file can be found (ignored if file is loaded from the web)

filename

Name of the file with extension (csv required)

fromURL

Boolean indicating whether the file should be loaded from computer (fromURL = FALSE) or internet ((fromURL = TRUE))

url

The url where the file can be found (ignored if fromURL = FALSE)

colstokeep

A sequence indicating which columns to keep. If NULL the whole dataframe is returned

fill.Ethiopia

Specific to import_FAO. Boolean indicating whether we should fill Ethiopia data with Ethiopia PDR data

cancercode

Code for cancer. Default is 'C18' that is colon cancer

Value

A tibble with requested data

Warning

Downloading from URL can be very long, it is recommended to load from computer

Examples

1
2
3
4
5
6
## Not run: 
df_FAO <- import_FAO(getwd(), colstokeep = 1:10)
df_WB  <- import_WB(fromURL = T, colstokeep = 1:6)
df_ILO <- import_ILO(paste0(getwd(),"/other"))
df_training <- import_training(path = datadir, colstokeep = NULL)
## End(Not run)

linogaliana/OpenCancer documentation built on May 30, 2019, 3:43 p.m.