rmarkdown::render('intro.Rmd', output_file = '../docs/intro.html')
https://github.com/IvanVoronin/FAT
This package provides a web-widget for interactive presentation of results from
exploratory factor analysis. The function loadings2table
accepts a matrix, a
data frame or an output from fa
function (from the
psych
package).
## Install the package # install.packages('devtools') library(devtools) install_github('ivanvoronin/FAT')
# Load packages library(FAT) library(psych)
## This is the toy data from psych ## Details in ?bfi data(bfi) bfi <- bfi[, 1:25] ## The BFI items will appear in hint popover on click hints <- c( A1 = "Am indifferent to the feelings of others. (q_146)", A2 = "Inquire about others' well-being. (q_1162)", A3 = "Know how to comfort others. (q_1206)", A4 = "Love children. (q_1364)", A5 = "Make people feel at ease. (q_1419)", C1 = "Am exacting in my work. (q_124)", C2 = "Continue until everything is perfect. (q_530)", C3 = "Do things according to a plan. (q_619)", C4 = "Do things in a half-way manner. (q_626)", C5 = "Waste my time. (q_1949)", E1 = "Don't talk a lot. (q_712)", E2 = "Find it difficult to approach others. (q_901)", E3 = "Know how to captivate people. (q_1205)", E4 = "Make friends easily. (q_1410)", E5 = "Take charge. (q_1768)", N1 = "Get angry easily. (q_952)", N2 = "Get irritated easily. (q_974)", N3 = "Have frequent mood swings. (q_1099)", N4 = "Often feel blue. (q_1479)", N5 = "Panic easily. (q_1505)", O1 = "Am full of ideas. (q_128)", O2 = "Avoid difficult reading material.(q_316)", O3 = "Carry the conversation to a higher level. (q_492)", O4 = "Spend time reflecting on things. (q_1738)", O5 = "Will not probe deeply into a subject. (q_1964)" )
## Factor analysis using psych FA <- fa(bfi, nfactors = 5, n.iter = 100) ## Render the table loadings2table(FA, hints = hints)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.