profileplot {profileR}R Documentation

Score Profile Plot

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

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

## 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)

[Package profileR version 0.3-5 Index]