read.csv: Reads comma-seperated value data files into R.

View source: R/read_csv.R

read.csvR Documentation

Reads comma-seperated value data files into R.

Description

Reads comma-seperated value data files into R. This function is specially made to work with Mobilize participatory sensing data. After loading the data, certain variable names are cleaned and others are automatically dropped. To read csv data in using the default method, run utils::read.csv().

Usage

read.csv(file, ...)

read_csv(file, ...)

Arguments

file

the name of the file which the data are to be read from. Each row of the table appears as one line of the file. If it does not contain an absolute path, the file name is relative to the current working directory, getwd(). Tilde-expansion is performed where supported. This can be a compressed file (see file).

Alternatively, file can be a readable text-mode connection (which will be opened for reading if necessary, and if so closed (and hence destroyed) at the end of the function call). (If stdin() is used, the prompts for lines may be somewhat confusing. Terminate input with a blank line or an EOF signal, Ctrl-D on Unix and Ctrl-Z on Windows. Any pushback on stdin() will be cleared before return.)

file can also be a complete URL. (For the supported URL schemes, see the ‘URLs’ section of the help for url.)

...

Further arguments to be passed to read.table.

Examples

## Not run: 
food <- read.csv("Food_Habits_Data.csv")

## End(Not run)

mobilizingcs/mobilizr documentation built on Feb. 17, 2024, 7:49 p.m.