Re: [R] Interpreting fa.diagram from package psych

2022-09-11 Thread David Winsemius
On 9/11/22 07:17, Ebert,Timothy Aaron wrote: It is a bad graphic as the legend that should explain the color coding is missing. The next option is to copy the data and code and see if you can reproduce the figure. You can then play with the code and read a bit about the procedures to figure

Re: [R] inadequacy in as.integer....

2022-09-11 Thread akshay kulkarni
Dear Tim, I am using the result of cumsum(), which has leading zeroes, (like 0 0 1 1 2 2), coerce it to a character vector, collapse it, and then coerce it back to an integer to compare it in a switch statement. But now I got it. I can just use the collapsed character value...T

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Ebert,Timothy Aaron
Can you tell us why you want to do this? Is there something special about 09098 versus 9098 or 009098? In any mathematical operation these are all the same number. Tim From: akshay kulkarni Sent: Sunday, September 11, 2022 2:58 PM To: Ebert,Timothy Aaron ; R help Mailing list Subject: Re

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Bert Gunter
You seem to be confusing **what** is printed with *how* it is printed. > print(9) ## a numeric (not an integer, actually. That would be 9L) [1] 9 ## default print format > print(formatC(9, width =2, flag = "0")) ## format specification [1] "09" > print(formatC(9, width =2, flag = "0"), quote = F

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Andrew Simmons
What you're asking for doesn't make sense: 9098 and 09098 are the same 9098L == 09098L If you mean specifically while printing, you could use sprintf: cat(sprintf("%05d", 9098)) On Sun., Sep. 11, 2022, 14:58 akshay kulkarni, wrote: > Dear Tim, > So there is no way to coerce

Re: [R] inadequacy in as.integer....

2022-09-11 Thread JRG via R-help
On 9/11/22 12:22, akshay kulkarni wrote: > Dear members, > I came across this queer thing during my analysis: >> as.integer("09098") > 9098 > > Any idea on how to retain the "0"? Don't use as.integer(), which has performed precisely the service that it advertises? I certainly wouldn't call this

Re: [R] Interpreting fa.diagram from package psych

2022-09-11 Thread Ebert,Timothy Aaron
It is a bad graphic as the legend that should explain the color coding is missing. The next option is to copy the data and code and see if you can reproduce the figure. You can then play with the code and read a bit about the procedures to figure out what is going on. It should not be too hard.

Re: [R] Interpreting fa.diagram from package psych

2022-09-11 Thread Luigi Marongiu
Sorry, the file was automatically downloaded and opened with the browser instead of pointing to the webpage. Here is a better link: https://cran.r-project.org/web/packages/psychTools/vignettes/factor.pdf The figure is on page 22. The question is: The dots have different colors; how do I know what t