jbferet / biodivMapR

biodivMapR: an R package for α- and β-diversity mapping using remotely-sensed images
https://jbferet.github.io/biodivMapR/index.html
GNU General Public License v3.0
47 stars 13 forks source link

Error in example_script.R #4

Closed sparkvilla closed 4 years ago

sparkvilla commented 4 years ago

Hi there,

I just got started with this package. I am trying to execute the example script but I get this error:

Error in Summary.factor(c(1L, 1L, 1L), na.rm = FALSE) : 
  ‘max’ not meaningful for factors
In addition: There were 50 or more warnings (use warnings() to see the first 50)

I am using the example_script.R from the package. I changed only the Output_Dir path and I have chosen PC 1, PC 2, PC 3 when asked to. Isn't the script suppose to work as it is?

Thank you in advance

jbferet commented 4 years ago

yes, it is supposed to work as is. I double-checked and it does not raise any error on my computer. can you please refer to https://jbferet.github.io/biodivMapR/articles/biodivMapR.html

and make sure you followed the proper format for definition of principal components? you should define one component per line on the "Selected_Components.txt" file which is supposed to open automatically.

then save the file an dpress enter. The code will just run until the end.

If you still have problems after you follow the tutorial, I may need additional information (R script, full result directory when bug happened, and screen capture of all the messages printed on your R terminal) to identfy what went wrong.

Thank you.

jb

jbferet commented 4 years ago

Hi, you need to save the selected component file let me know if this works. cheers, jb

Le mer. 14 oct. 2020 à 09:10, sparkvilla notifications@github.com a écrit :

Hi there,

I just got started with this package. I am trying to execute the example script but I get this error at "MAP SPECTRAL SPECIES":

Error in read.table(PC_Select_Path) : no lines available in input

I am using the example_script.R from the package (I changed only the Output_Dir path). Isn't the script suppose to work as it is?

Thank you in advance

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbferet/biodivMapR/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANC6BGPN3ZHWHVTW74DBRNLSKVFH5ANCNFSM4SQGVHXA .

sparkvilla commented 4 years ago

@jbferet Thank you for your replay. Indeed, I was passing the components as PC 1, PC 2 ...etc while the correct format is 1, 2, ...etc on separate lines. Now it runs until the end. Thank you again! cheers, dv