columns
is_float
is_float
Description
Checks if a given string can be converted to a floating-point number in Python.
Usage
is_float(string)
Arguments
Argument | Description |
---|---|
string |
Character. String to check. |
Return Value
Logical. TRUE
if conversion was successful, FALSE
if not.
Examples
## Example usage:
is_numeric("3.14")
AbstractColumnDefinition
Description
Abstract class to store columns
Methods
Public Methods
AbstractColumnDefinition$new()
AbstractColumnDefinition$is_allowed()
AbstractColumnDefinition$clone()
Method new()
Creates a new instance of the AbstractColumnDefinition class
Usage
AbstractColumnDefinition$new(col_type, name, description, dtype, required)
Arguments:
col_type
(data.frame
)\cr Type of the column.name
(character(1)
)\cr Name of the column.description
(character(1)
)\cr Description of the column.dtype
(\verb{Data type})\cr Data type of the column.required
(Logical
)\cr Bool that specifies if the column is required.
Method is_allowed()
Tests if cell is allowed
Usage
AbstractColumnDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method clone()
The objects of this class are cloneable with this method.
Usage
AbstractColumnDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
VariableDefinition
Description
Class to store variable columns
Methods
Public Methods
Method new()
Creates a new instance of the VariableDefinition class
Usage
VariableDefinition$new(name, description, required)
Arguments:
name
(Character
): Name of the column.description
(Character
): Description of the column.required
(Logical
): Bool that specifies if the column is required.
Method is_allowed()
Tests if cell is allowed
Usage
VariableDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method clone()
The objects of this class are cloneable with this method.
Usage
VariableDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
UnitDefinition
Description
Class to store Unit columns
Methods
Public Methods
Method new()
Creates a new instance of the UnitDefinition class
Usage
UnitDefinition$new(name, description, required)
Arguments:
name
Character. Name of the column.description
Character. Description of the column.required
Logical. Bool that specifies if the column is required.
Method is_allowed()
Tests if cell is allowed
Usage
UnitDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method clone()
The objects of this class are cloneable with this method.
Usage
UnitDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
ValueDefinition
Description
Class to store Value columns
Methods
Public Methods
Method new()
Creates a new instance of the ValueDefinition class
Usage
ValueDefinition$new(name, description, required)
Arguments:
name
Character. Name of the column.description
Character. Description of the column.required
Logical. Bool that specifies if the column is required.
Method is_allowed()
Tests if cell is allowed
Usage
ValueDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method clone()
The objects of this class are cloneable with this method.
Usage
ValueDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
CommentDefinition
Description
Class to store comment columns
Methods
Public Methods
Method new()
Creates a new instance of the CommentDefinition Class
Usage
CommentDefinition$new(name, description, required)
Arguments:
name
Character. Name of the column.description
Character. Description of the column.required
Logical. Bool that specifies if the column is required.
Method is_allowed()
Tests if cell is allowed
Usage
CommentDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method clone()
The objects of this class are cloneable with this method.
Usage
CommentDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
AbstractFieldDefinition
Description
Abstract class to store fields
Examples
### ------------------------------------------------
### Method `AbstractFieldDefinition$select_and_expand`
### ------------------------------------------------
## Example usage:
## select_and_expand(df, "col_id", field_vals = NULL)
Methods
Public Methods
AbstractFieldDefinition$new()
AbstractFieldDefinition$is_allowed()
AbstractFieldDefinition$select_and_expand()
AbstractFieldDefinition$clone()
Method new()
Creates a new instance of the AbstractFieldDefinition Class
Usage
AbstractFieldDefinition$new(
field_type,
name,
description,
dtype,
coded,
codes = NULL
)
Arguments:
field_type
Type of the fieldname
Name of the fielddescription
Description of the fielddtype
Data type of the fieldcoded
If the field is codedcodes
Optional codes for the field (default: NULL)
Method is_allowed()
Tests if cell is allowed
Usage
AbstractFieldDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method select_and_expand()
Select and expand fields which are valid for multiple periods or other field vals
Usage
AbstractFieldDefinition$select_and_expand(df, col_id, field_vals = NA, ...)
Arguments:
df
DataFrame where fields should be selected and expandedcol_id
col_id of the column to be selected and expandedfield_vals
NULL or list of field_vals to select and expand...
Additional keyword arguments
Example:
## Example usage:
## select_and_expand(df, "col_id", field_vals = NULL)
Returns:
DataFrame where fields are selected and expanded
Method clone()
The objects of this class are cloneable with this method.
Usage
AbstractFieldDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
RegionFieldDefinition
Description
Class to store Region fields
Methods
Public Methods
Method new()
Creates a new instance of the RegionFieldDefinition class
Usage
RegionFieldDefinition$new(name, description)
Arguments:
name
Character. Name of the field.description
Character. Description of the field.
Method clone()
The objects of this class are cloneable with this method.
Usage
RegionFieldDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
PeriodFieldDefinition
Description
Class to store Period fields
Methods
Public Methods
Method new()
Creates a new instance of the PeriodFieldDefinition Class
Usage
PeriodFieldDefinition$new(name, description)
Arguments:
name
Character. Name of the field.description
Character. Description of the field
Method is_allowed()
Tests if cell is allowed
Usage
PeriodFieldDefinition$is_allowed(cell)
Arguments:
cell
cell to test
Method clone()
The objects of this class are cloneable with this method.
Usage
PeriodFieldDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
SourceFieldDefinition
Description
Class to store Source fields
Methods
Public Methods
Method new()
Creates a new instance of the SourceFieldDefinition class
Usage
SourceFieldDefinition$new(name, description)
Arguments:
name
Character. Name of the field.description
Character. Description of the field.
Method clone()
The objects of this class are cloneable with this method.
Usage
SourceFieldDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.
CustomFieldDefinition
Description
Class to store Custom fields
Methods
Public Methods
Method new()
Creates a new instance of the CustomFieldDefinition class
Usage
CustomFieldDefinition$new(field_specs)
Arguments:
field_specs
Specs of the custom field
Method clone()
The objects of this class are cloneable with this method.
Usage
CustomFieldDefinition$clone(deep = FALSE)
Arguments:
deep
Whether to make a deep clone.