filter_istat | R Documentation |
Filter data set by column(s). Takes as input a data.frame (not only ISTAT ones) and allows you to select for which column(s) value(s) to filter the dataset. Alternatively, use filter_istat_interactive for an interactive version.
filter_istat(dataset, columns, datatype, lang = "ita")
dataset |
as data.frame |
columns |
data set column(s) for which you want to filter the data. If you want to filter for more than one column, write c("column1","column2", ...) as argument. |
datatype |
column(s) value(s) for which you want to filter the data. Write as many datatype as many columns that you selected in "columns" (as in examples). |
lang |
language parameter for labels ("ita" for Italian, "eng" for English) |
It returns the filtered data set.
filter_istat(iris, columns = "Species", datatype = "setosa") #Here,
#the function filters the data set 'iris' for the value 'setosa' of the column 'Species'.
filter_istat(iris, columns = c("Species","Petal.Width"),
datatype = list(c("virginica","setosa"), c("0.1","1.9")))
# Here, the function filters the data set 'iris' for the values 'virginica'
#and 'setosa' of the column 'Species' and for the values '0.1' and '1.9' of
#the column 'Petal.Width'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.