# NOT RUN {
### Note: the 'not run' is simply because running takes a lot of time,
### but these examples are all safe to run!
# }
# NOT RUN {
### This will prompt the user to select an SPSS file
scaleDiagnosis();
### Generate a datafile to use
exampleData <- data.frame(item1=rnorm(100));
exampleData$item2 <- exampleData$item1+rnorm(100);
exampleData$item3 <- exampleData$item1+rnorm(100);
exampleData$item4 <- exampleData$item2+rnorm(100);
exampleData$item5 <- exampleData$item2+rnorm(100);
### Use a selection of two variables
scaleDiagnosis(dat=exampleData, items=c('item2', 'item4'));
### Use all items
scaleDiagnosis(dat=exampleData);
# }
Run the code above in your browser using DataLab