R Utilities: Scan a Character Vector

Description

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

Usage

1
2
3
4

Arguments

vec

A string which should be splitted according to blanks

file

File to be scanned. See base::scan.

...

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

Author(s)

Alexander Robitzsch

See Also

base::scan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#############################################################################
# EXAMPLE 1: Example scan.vec | reading a string
#############################################################################	
	
vars <- scan.vector( "female urbgrad  groesse  Nausg    grpgroesse   privat  ")
vars
  ## [1] "female"     "urbgrad"    "groesse"    "Nausg"      "grpgroesse"
  ## [6] "privat"    

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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.