Closed daveglover closed 3 years ago
Dave,
Thanks for the note.
Is there any possibility that your "Length" variable is actually "Length " (with the extra space on the end). Your results from str()
imply that that might be the case (there is a space between "Length" and the colon but not between "Species" and the colon).
If not, I don't see the issue immediately. Is it possible for you to send me your data file so that I can try repeating the issue and then troubleshooting from there. You can send it directly to derek@derekogle.com.
Thanks.
That didn't seem to be the issue. I did find, however, that if I explicitly define df as a data frame I have no issues. I assumed I was working with a data frame, but it turns out when I import my data from a CSV file the data is coming in as class = tbl_df.
df <- data.frame(rawdata[c("Species", "Length")])
That was my second guess as I have had problems with other functions relative to the data being a tibble (the tbl_df
). I will get that fixed for the next version. I will let you know when it is fixed in the development version so you can give that a try if you would like as it may be a while before we release the next version to CRAN.
Thanks for letting me know and thanks for your patience.
Easy enough to be more explicit in my programming. Thank you!
More and more people are using methods to read data that result in tbl_df
, so we need to fix this. Re-opening so I remember to fix this.
I'm having an issue with certain functions that require a "formula" such as psdCalc and psdPlot. Length is not being recognized as numeric. I simplified my data frame to just one species and associated lengths (nearest mm) to demonstrate the issue. I'm able to run the simulated yellow perch data from examples in the help files just fine. Love the FSA package and book, btw.
Thanks in advance for any help! Dave