Hello everyone,
Recently I am trying to use cfa() and summary() functions within a large for loop, so it spends a significant part of the time printing the output from the summary() function. Is there any way to hide this output, without deleting the elements within the object sum ?
sum <- summary(fit, standardized = TRUE, fit.measures=TRUE)
I have already tried with invisible() , but I am new in R and do not really know what other alternatives exist...
Thank you in advance!
Alicia.
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/81692523-66ca-4e53-9ed1-046e76a7d863%40googlegroups.com.
What exactly are you trying to achieve? Let's assume you want to extract the chi square value on each iteration, then you can save it into a simple vector and display the results after the loop. The way it is currently written down (sum <-...) won't help you at all, because after the loop sum only stores the results of the last iteration or am I making a mistake here?
Am 24.12.19, 13:26 schrieb "Alicia FRANCO MARTÍNEZ" <alic...@ucm.es>:
Hello everyone,--
Recently I am trying to use cfa() and summary() functions within a large for loop, so it spends a significant part of the time printing the output from the summary() function. Is there any way to hide this output, without deleting the elements within the object sum ?
sum <- summary(fit, standardized = TRUE, fit.measures=TRUE)
I have already tried with invisible() , but I am new in R and do not really know what other alternatives exist...
Thank you in advance!
Alicia.
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.
--Hello!
I am trying to take some of the values from sum object, correct. Sorry, the problem is not related to the loop structure, I only wrote that example to make it simpler. Actually, I just want to know how to hide the whole output from the console, and just extract each value. However, even if a use this line of code:
pvalue <- summary(fit, standardized = TRUE, fit.measures=TRUE)[["FIT"]][["pvalue"]]
It prints the whole summary. Any way to hide it and still capture the value?
Thanks,
Alicia.
El martes, 24 de diciembre de 2019, 14:19:46 (UTC+1), car...@web.de escribió:What exactly are you trying to achieve? Let's assume you want to extract the chi square value on each iteration, then you can save it into a simple vector and display the results after the loop. The way it is currently written down (sum <-...) won't help you at all, because after the loop sum only stores the results of the last iteration or am I making a mistake here?
Am 24.12.19, 13:26 schrieb "Alicia FRANCO MARTÍNEZ" < alic...@ucm.es>:Hello everyone,--
Recently I am trying to use cfa() and summary() functions within a large for loop, so it spends a significant part of the time printing the output from the summary() function. Is there any way to hide this output, without deleting the elements within the object sum ?
sum <- summary(fit, standardized = TRUE, fit.measures=TRUE)
I have already tried with invisible() , but I am new in R and do not really know what other alternatives exist...
Thank you in advance!
Alicia.
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/81692523-66ca-4e53-9ed1-046e76a7d863%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/fb6b8350-25cb-4ac3-b9ab-6113c541f39d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/fb6b8350-25cb-4ac3-b9ab-6113c541f39d%40googlegroups.com.