profileplot | R Documentation |
The profileplot
function creates a profile plot for a matrix or dataframe with multiple scores or subscores using ggplot
function in ggplot2
package.
profileplot( form, person.id, standardize = TRUE, interval = 10, by.pattern = TRUE, original.names = TRUE )
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. |
The profileplot
functions returns a score profile plot from either ggplot or the base graphics in R.
ggplot, PS
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.