profileplot: Score Profile Plot

Description Usage Arguments Value See Also Examples

Description

The profileplot function creates a profile plot for a matrix or dataframe with multiple scores or subscores using ggplot function in ggplot2 package.

Usage

1
2
profileplot(form, person.id, standardize = TRUE, interval = 10,
  by.pattern = TRUE, original.names = TRUE)

Arguments

form

A matrix or dataframe including two or more subscores.

person.id

A vector that includes person ID values (Optional).

standardize

If not FALSE, all scores are rescaled with a mean of 0 and standard deviation of 1. Default is TRUE.

interval

The number of equal intervals from the mimimum score to the meximum score. Default is 10. Ignored when by.pattern=FALSE.

by.pattern

If TRUE, the function creates a profile plot with level and pattern values using ggplot2. Otherwise, the function creates a profile plot showing profile scores of persons using the base graphics in R. Default is TRUE.

original.names

Use the original column names in the data. Otherwise, columns are renamed as v1,v2,.... Default is TRUE.

Value

The profileplot functions returns a score profile plot from either ggplot or the base graphics in R.

See Also

ggplot, PS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(PS)
 myplot <- profileplot(PS[,2:4], person.id = PS$Person,by.pattern = TRUE, original.names = TRUE)
 myplot

data(leisure)
leis.plot <- profileplot(leisure[,2:4],standardize=TRUE,by.pattern=FALSE)
leis.plot

## End(Not run)

Example output

Loading required package: ggplot2
Loading required package: RColorBrewer
Loading required package: reshape
Loading required package: lavaan
This is lavaan 0.5-23.1097
lavaan is BETA software! Please report any bugs.
NULL

profileR documentation built on May 2, 2019, 8:31 a.m.