Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

newDatasetFromFile

Upload a file to Crunch to make a new dataset


Description

This function allows you to upload a .csv or .sav file directly to Crunch without first reading it into R. This is useful both because it preserves SPSS metadata that is lost when reading .sav files into R and because it is more efficient just to upload the file to the server.

Usage

newDatasetFromFile(x, name = basename(x), schema, ...)

Arguments

name

character, the name to give the new Crunch dataset. By default the name of the dataset will be the filename

schema

character, the path to a local file to upload, or a URL. The file specifies the dataset schema (variable types, categories, etc.) to use. Currently only implemented for Triple-S files. This should either be a .xml or .sss file (both are possible for Triple-S metadata files)

...

additional arguments passed to createDataset

file

character, the path to a local file to upload, or a URL. This should either be a .csv, .sav (SPSS), .asc (Triple-S data), or .dat (Triple-S data) file

Details

You no longer need to call this function directly: you can call newDataset() and pass the filename or URL, and it will handle it for you, thereby saving you eight keystrokes.

Value

On success, an object of class CrunchDataset

See Also


crunch

Crunch.io Data Tools

v1.28.0
LGPL (>= 3)
Authors
Greg Freedman Ellis [aut, cre], Jonathan Keane [aut], Mike Malecki [aut], Neal Richardson [aut], Gordon Shotwell [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.