cpp_regex_selector_name: Extract Selector Name From Variable Name

Description Usage Arguments Details Value Examples

View source: R/RcppExports.R

Description

This function extract the selector name (e.g. 'var') from a variable name like 'data$var'.

Usage

1

Arguments

x

std::string containing the selector name (usually in the form (containingObject)$(selector)).

Details

This function basically takes variables names of the form (containingObject)$(selector) as an input. With a regex command the last selector - meaning the substring behind the last '$' - will be extracted and returned. In case that the input parameter x does not contain a selector, the empty string will be returned.

Value

std::string containing the extracted selector part. In case no selector can be found, the an empty string is returned.

Examples

1
2
  # The outcome should be simply 'SalePrice'
  KaggleHouse:::cpp_regex_selector_name(data_train_na$SalePrice)

MarcoNiemann/kaggle_house documentation built on May 7, 2019, 2:50 p.m.