Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scan.vector

R Utilities: Scan a Character Vector


Description

The function scan.vec function splits a string into a character vector. The function scan0 is the base::scan function using the default what="character".

Usage

scan.vec(vec)
scan.vector(vec)

scan0(file="", ...)

Arguments

vec

A string which should be split according to blanks

file

File to be scanned. See base::scan.

...

Further arguments to be passed. See base::scan.

See Also

Examples

#############################################################################
# EXAMPLE 1: Example scan.vec | reading a string
#############################################################################


vars <- miceadds::scan.vector( "female urbgrad \n  groesse  \t  Nausg    grpgroesse   privat  ")
vars
  ## [1] "female"     "urbgrad"    "groesse"    "Nausg"      "grpgroesse"
  ## [6] "privat"

## the next lines are only commented out to fulfill CRAN checks
## vars2 <- miceadds::scan0()
##     female urbgrad  groesse  Nausg    grpgroesse   privat

miceadds

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.