Title | Exam-2017- with solutions |
---|---|
Author | Na Ba |
Course | Data analysis and visualization in R |
Institution | Technische Universität München |
Pages | 17 |
File Size | 289.5 KB |
File Type | |
Total Downloads | 223 |
Total Views | 292 |
Data Analysis and Visualization in R - Writ-ten examination05 April 20171 IdentificationMatriculation number: Last name, first name: Bachelor or Master:2 PreambleNo document nor electronic device is allowed. Answer directly on the sheet. For multiple choice questions, there can be 1 or multiple corr...
Data Analysis and Visualization in R - Written examination 05 April 2017
1
Identification Matriculation number: Last name, first name: Bachelor or Master:
2
Preamble No document nor electronic device is allowed. Answer directly on the sheet. For multiple choice questions, there can be 1 or multiple correct answers. Here are some R help exerts of a few commands:
2.1
dcast {data.table} dcast(data, formula, fun.aggregate = NULL, sep = “_“, . . . , margins = NULL, subset = NULL, fill = NULL, drop = TRUE, value.var = guess(data), verbose = getOption(”datatable.verbose“)) • data: A data.table • formula: a formula of the form LHS ~ RHS to cast. • fun.aggregate: Should the data be aggregated before casting? If the formula doesn’t identify a single observation for each cell, then aggregation defaults to length with a message. • sep: character vector of length 1, indicating the separating character in variable names generated during casting. Default is _ for backwards compatibility. • . . . : any other arguments that may be passed to the aggregating function. • subset: specified if casting should be done on a subset of the data. Ex: subset = .(col1...