View source: R/flat_table_read.R
read_flat_table_file | R Documentation |
Reads a text file and creates a flat_table
object. The file is expected to
contain a flat table whose first row contains the name of the columns. All
columns are considered to be of type String.
read_flat_table_file(name, file, sep = ",", page = NULL, unknown_value = NULL)
name |
A string, flat table name. |
file |
A string, name of a text file. |
sep |
Column separator character. |
page |
A string, name of the new field in which to include the name of the file. |
unknown_value |
A string, value used to replace empty and NA values in attributes. |
When multiple files are handled, the file name may contain information associated with the flat table, it could be the table page information if the name of a new field in which to store it is indicated in the page parameter.
We can also indicate the value that is used in the data with undefined values.
A flat_table
object.
star_database
Other flat table definition functions:
as_star_database()
,
flat_table()
,
get_table()
,
get_unknown_value_defined()
,
get_unknown_values()
,
read_flat_table_folder()
file <-
system.file("extdata/mrs",
"mrs_122_us_cities_1962_2016_new.csv",
package = "rolap")
ft <- read_flat_table_file('mrs_new', file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.