Learn R Programming

loadeR (version 1.2.0)

carga.datos: Load data from text file.

Description

Load data from text file.

Usage

carga.datos(
  nombre.filas = TRUE,
  ruta = NULL,
  separador = ";",
  sep.decimal = ",",
  encabezado = TRUE,
  deleteNA = TRUE,
  preview = FALSE
)

Value

A data.frame object with the information of a file.

Arguments

nombre.filas

a logical value indicating whether the file contains the names of the rows as its first column.

ruta

the name of the file which the data are to be read from.

separador

the field separator character.

sep.decimal

the character used in the file for decimal points.

encabezado

a logical value indicating whether the file contains the names of the variables as its first line.

deleteNA

a logical value indicating if rows with NA should be removed.

preview

a logical value indicating if only load the first 10 rows.

Author

Diego Jimenez <diego.jimenez@promidat.com>

Examples

Run this code
tf <- tempfile()
write.table(iris, tf, sep = ";", dec = ",", row.names = FALSE)
carga.datos(ruta = tf, nombre.filas = FALSE, preview = TRUE)

Run the code above in your browser using DataLab