read.clipboard(header = TRUE, ...) #assumes headers and tab or space delimited
read.clipboard.csv(header=TRUE,sep=',',...) #assumes headers and comma delimited
read.clipboard.lower(diag=TRUE,names=NULL,...) #read in a matrix given the lower off diagonal
read.clipboard.upper(diag=TRUE,names=NULL,...)
Based upon a suggestion by Ken Knoblauch to the R-help listserve.
read.clipboard.lower and read.clipboard.upper are adapted from John Fox's read.moments function in the sem package. They will read a lower (or upper) triangular matrix from the clipboard and return a full, symmetric matrix for use by factanal, factor.pa
, ICLUST
, etc. If the diagonal is false, it will be replaced by 1.0s. These two function were added to allow easy reading of examples from various texts and manuscripts with just triangular output.
#my.data <- read.clipboad()
#my.data <- read.clipboard.csv()
#my.data <- read.clipboad(header=FALSE)
Run the code above in your browser using DataLab