data_unit | R Documentation |
The function returns the grammage and unit of products as two additional columns.
data_unit(data = data.frame(), units = c("g|ml|kg|l"), multiplication = "x")
data |
The user's data frame. The data frame must contain the |
units |
Units of products which are to be detected (e.g. "ml|g|kg") |
multiplication |
A sign of the multiplication used in product descriptions (e.g. "x") |
The function returns the user's data frame with two additional columns: grammage
and unit
. The values of these columns are extracted from product descriptions on the basis of provided units
. Please note, that the function takes into consideration a sign of the multiplication, e.g. if the product description contains: '2x50 g', we obtain: grammage: 100
and unit: g
for that product (for multiplication
set to 'x').
data_unit(dataU, units=c("g|ml|kg|l"), multiplication="x")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.