eemR icon indicating copy to clipboard operation
eemR copied to clipboard

eem_read not creating eemlist class objects

Open JMahaux opened this issue 1 year ago • 5 comments

Hi Philippe,

I'm having an issue with the eem_read function in that it's not creating objects of class eemlist. I have also tried using the "eem" function to construct the object but keep getting an error saying R can't find the function "eem" (along with some of the other eemR functions, like "summary.eemlist"). I'm importing data from an aqualog and am able to create a list object using eem_read, but not an eemlist, which seems to be giving me trouble when I try to do blank subtractions and raman normalisation since I believe the function is not recognizing my inputs as valid - using eem_remove_blank with the eem and blank lists returns "Error in if (is.na(blank)) { : the condition has length > 1"

The package is loaded correctly and the function shows up when I use "?eem" so I'm at a bit of a loss about what's going wrong. I'm relatively new to R so it's entirely possible I've missed a crucial step somewhere, but any help here would be appreciated!

Thanks!

JMahaux avatar Oct 02 '23 18:10 JMahaux

Hi.

Are you able to run the examples provided in the package help?

PMassicotte avatar Oct 02 '23 20:10 PMassicotte

Yes, it seems to work with the example data so it's likely an issue with my input formatting. I'm trying to get the various indices (BIX, HIX, FI) with data from many days' runs and currently have a folder with all of the sample EEMs and a folder with a matched blank file (BEM.dat from the aqualog) for each sample. Should these instead be the daily .blank files?

On Mon, Oct 2, 2023 at 2:24 PM Philippe Massicotte @.***> wrote:

Hi.

Are you able to run the examples provided in the package help?

— Reply to this email directly, view it on GitHub https://github.com/PMassicotte/eemR/issues/73#issuecomment-1743705844, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ63UNH6QDVUE6Z4II3RY6TX5MPHVAVCNFSM6AAAAAA5PZXZ3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTG4YDKOBUGQ . You are receiving this because you authored the thread.Message ID: @.***>

JMahaux avatar Oct 02 '23 21:10 JMahaux

If eem_read() works on your data, it should return an object of class eemlist. Your data should be organized (not mandatory, but will help for automatic correction) as this:

https://github.com/PMassicotte/eemR/tree/main/inst/extdata/cary

Is it how you have it organized?

PMassicotte avatar Oct 03 '23 10:10 PMassicotte

No, I currently have all the sample EEMs in one folder and all the blanks in another since I didn't want to have to import ~30 days worth of data folders individually, but I will try organizing a portion of it as you have to see if it helps.

On Tue, Oct 3, 2023 at 4:53 AM Philippe Massicotte @.***> wrote:

If eem_read() works on your data, it should return an object of class eemlist. Your data should be organized (not mandatory, but will help for automatic correction) as this:

https://github.com/PMassicotte/eemR/tree/main/inst/extdata/cary

Is it how you have it organized?

— Reply to this email directly, view it on GitHub https://github.com/PMassicotte/eemR/issues/73#issuecomment-1744720324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ63UNBZ3OEU6GASC7VAEL3X5PVCPAVCNFSM6AAAAAA5PZXZ3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUG4ZDAMZSGQ . You are receiving this because you authored the thread.Message ID: @.***>

JMahaux avatar Oct 03 '23 15:10 JMahaux

Maybe some information for you here: https://pmassicotte.github.io/eemR/articles/introduction.html

PMassicotte avatar Oct 03 '23 18:10 PMassicotte