clipboard | R Documentation |
lavaan
or FitDiff
objects into a
clipboard or a fileCopy or save the result of lavaan
or FitDiff
object into a clipboard or a file. From the clipboard, users may paste the
result into the Microsoft Excel or spreadsheet application to create a table
of the output.
clipboard(object, what = "summary", ...)
saveFile(object, file, what = "summary", tableFormat = FALSE,
fit.measures = "default", writeArgs = list(), ...)
object |
An object of class lavaan::lavaan or FitDiff. |
what |
The attributes of the |
... |
Additional arguments when passing a |
file |
A file name used for saving the result. |
tableFormat |
If |
fit.measures |
|
writeArgs |
|
The resulting output will be saved into a clipboard or a file. If
using the clipboard
function, users may paste it in the other
applications.
Sunthud Pornprasertmanit (psunthud@gmail.com)
Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)
library(lavaan)
HW.model <- ' visual =~ x1 + c1*x2 + x3
textual =~ x4 + c1*x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HW.model, data = HolzingerSwineford1939, group = "school")
if(interactive()){
# Copy the summary of the lavaan object
clipboard(fit)
# pass additional arguments to summary() method for class?lavaan
clipboard(fit, rsquare = TRUE, standardized = TRUE, fit.measures = TRUE)
# Copy modification indices and fit stats from the miPowerFit() function
clipboard(fit, "mifit")
# Copy the parameter estimates
clipboard(fit, "coef")
# Copy the standard errors
clipboard(fit, "se")
# Copy the sample statistics
clipboard(fit, "samp")
# Copy the fit measures
clipboard(fit, "fit")
# Save the summary of the lavaan object
saveFile(fit, "out.txt")
# Save modification indices and fit stats from the miPowerFit() function
saveFile(fit, "out.txt", "mifit")
# Save the parameter estimates
saveFile(fit, "out.txt", "coef")
# Save the standard errors
saveFile(fit, "out.txt", "se")
# Save the sample statistics
saveFile(fit, "out.txt", "samp")
# Save the fit measures
saveFile(fit, "out.txt", "fit")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.