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

runCrunchAutomation

Run a crunch automation script


Description

Crunch automation is a custom scripting syntax that allows you to concisely describe the metadata of your data when importing. The syntax is described in the crunch API documentation

Usage

runCrunchAutomation(dataset, script, is_file = string_is_file_like(script))

showScriptErrors()

Arguments

dataset

A crunch dataset

script

A path to a text file with crunch automation syntax or a string the syntax loaded in R.

is_file

The default guesses whether a file or string was used in the script argument, but you can override the heuristics by specifying TRUE for a file, and FALSE for a string.

Value

For runCrunchAutomation(): an updated dataset (invisibly), For showScriptErrors(), when run after a failure, a list with two items: script: that contains the script string sent to the server and errors which is a data.frame with details about the errors sent from the server.

See Also

Examples

## Not run: 
# Can use a path to a file:
script_file <- "crunch_automation.txt"
ds <- runCrunchAutomation(ds, script_file)

# Or a string directly:
ds <- runCrunchAutomation(ds, "RENAME v1 TO age;")

# After a failed run, some error information prints to console,
# But more details are available with function:
showScriptErrors()

# After a successful run, can look at scripts
scripts(ds)


## End(Not run)

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.