Detects Non-profit institutes with special conditions
Source:R/cockburn.r
cockburn_detect_inst_conds_2.Rd
STATA equivalent replace asstype = "inst" if strpos(standard_name," FOUND ")~=0 & asstype~="univ" assume a bug: " FOUND ")~=0 -> " FOUND ")>0 replace asstype = "inst" if strpos(standard_name," INST ")>0 & asstype~="univ"
Usage
cockburn_detect_inst_conds_2(
x,
output_codes_col_name = "{col_name_}entity_type",
merge_existing_codes = "append_to_existing",
...
)
Arguments
- x
table. Expected that x has a column with codes for universities
- output_codes_col_name
column with codes for universities ("univ"). Default is last column of x
- merge_existing_codes
same as in
detect_patterns()
- ...
Arguments passed on to
standardize_options
col
Column of interest (the one we need to standardize) in the
x
object (if it is data.frame like).rows
Logical vector to filter records of interest. Default is NULL which means do not filter records.
omitted_rows_value
If
rows
parameter is set then mergeomitted_rows_value
with the results (filtered byrows
). Either single string or a character vector of lengthnrow(x)
. If NULL (the default) then original values ofcol
are merged with results.output_placement
Where to inset retults (standardized vector) in the
x
object. Default options is 'replace_col' which overwrides thecol
inx
with results. Other options:'omit' :: do not write results back to table (usually used when
append_output_copy
is set for temporary values)'prepend_to_col' :: prepend to
col
'append_to_col' :: append to
col
'prepend_to_x' :: prepend to
x
data.frame like object'append_to_x' :: append to
x
data.frame like object
x_atomic_name
If
x
is vector use this name for original column if it is in results. Default is "x". Ifx
is table the name ofcol
will be used.output_col_name
Use this name for the column with results (standardized values). Parts in curly brakeds are substitute strings. Options for substitutions are:
append_output_copy
Whether to append a copy of result vector to
x
objectoutput_copy_col_name
How the append copy wiil be named