Re: [R] Adding a numeric class to a data.frame

2023-06-04 Thread avi.e.gross
Jeff, The number of items is not relevant except insofar as your vector of probabilities is in the same order as the other vector and the same length. If for example you had a vector of test scores for 10,000 tests and you calculated the probability in the data of having a 100, then the

Re: [R] Adding a numeric class to a data.frame

2023-06-04 Thread Jeff Newmiller
Still waiting for you to communicate... https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On June 4, 2023 7:20:56 PM PDT, Jeff Reichman wrote: >Yes - I could have done that but I have over 5,000 calculated probabilities. >So yes a little more detail would

Re: [R] Adding a numeric class to a data.frame

2023-06-04 Thread Jeff Reichman
Yes - I could have done that but I have over 5,000 calculated probabilities. So yes a little more detail would have helped. I'm needing to add those probability back into the original data.frame from which the model was created as I'm going to be using ggplot2 so I need the probabilities and

Re: [R] Adding a numeric class to a data.frame

2023-06-04 Thread avi.e.gross
Jeff R, it would be helpful if your intent was understood. For example, did you want output as a column of labels c("A", "B", "C") and another adjacent of c(0.0011566127, 0.0009267028, 0.0081623324) then you could do: data.frame(labels=c("A", "B", "C"), data=c(0.0011566127, 0.0009267028,

Re: [R] Adding a numeric class to a data.frame

2023-06-04 Thread Jeff Newmiller
The obvious answer is My_df$col_2 <- prob_result but whether that would work might depend on the structure of prob_result. What does dput(prob_result) return? On June 4, 2023 4:11:08 PM PDT, Jeff Reichman wrote: >R-Help Community > > > >How do I add a numeric class to a data .frame. > >

[R] Adding a numeric class to a data.frame

2023-06-04 Thread Jeff Reichman
R-Help Community How do I add a numeric class to a data .frame. For example, I have calculated the following probabilities 123 0.0011566127 0.0009267028 0.0081623324 How would I add them back into my data.frame for example My_df <-

Re: [R] error in arfima...

2023-06-04 Thread akshay kulkarni
Dear Martin, REgrets to reply this late I am staring at a conundrum never before encountered in my experience with R: LYGH[[201]] [1] 45.40 3.25 6.50 2.15 > arfima(LYGH[[201]]) Error in .fdcov(x, fdf$d, h, nar = nar, nma = nma, hess = hess, fdf.work = fdf$w) :