Hi,
I had an error on load_dam() function.
My environments are R 4.4.3, damr 0.3.7, behavr 0.3.3 (Windows 11).
The dataset was from https://github.com/rethomics/rethomics.github.io/raw/source/material/damr_tutorial.zip.
Here's my code:
> library(behavr)
> library(damr)
>
> DATA_DIR <- "./"
> list.files(DATA_DIR, pattern= "*.txt|*.csv")
[1] "metadata.csv" "Monitor11.txt" "Monitor14.txt" "Monitor64.txt"
>
> metadata <- read.csv("metadata.csv")
>
> #Linking
> metadata <- link_dam_metadata(metadata, result_dir = DATA_DIR)
> metadata
Key: <id>
id file_info start_datetime
<fctr> <list> <char>
1: 2017-07-01 08:00:00|Monitor11.txt|01 <list[2]> 2017-07-01 08:00:00
2: 2017-07-01 08:00:00|Monitor11.txt|02 <list[2]> 2017-07-01 08:00:00
3: 2017-07-01 08:00:00|Monitor11.txt|03 <list[2]> 2017-07-01 08:00:00
4: 2017-07-01 08:00:00|Monitor11.txt|04 <list[2]> 2017-07-01 08:00:00
5: 2017-07-01 08:00:00|Monitor11.txt|05 <list[2]> 2017-07-01 08:00:00
---
188: 2017-07-11 08:00:00|Monitor64.txt|28 <list[2]> 2017-07-11 08:00:00
189: 2017-07-11 08:00:00|Monitor64.txt|29 <list[2]> 2017-07-11 08:00:00
190: 2017-07-11 08:00:00|Monitor64.txt|30 <list[2]> 2017-07-11 08:00:00
191: 2017-07-11 08:00:00|Monitor64.txt|31 <list[2]> 2017-07-11 08:00:00
192: 2017-07-11 08:00:00|Monitor64.txt|32 <list[2]> 2017-07-11 08:00:00
stop_datetime region_id sex genotype replicate
<char> <int> <char> <char> <int>
1: 2017-07-04 00:00:00 1 M A 1
2: 2017-07-04 00:00:00 2 M A 1
3: 2017-07-04 00:00:00 3 M A 1
4: 2017-07-04 00:00:00 4 M A 1
5: 2017-07-04 00:00:00 5 M A 1
---
188: 2017-07-14 00:00:00 28 F C 2
189: 2017-07-14 00:00:00 29 F C 2
190: 2017-07-14 00:00:00 30 F C 2
191: 2017-07-14 00:00:00 31 F C 2
192: 2017-07-14 00:00:00 32 F C 2
> #Loading
> dt <- load_dam(metadata)
Error in find_dam_first_last_lines(path, start_datetime, stop_datetime, :
No data in selected date range
> summary(dt)
Error in object[[i]] : object of type 'closure' is not subsettable
According to the previous issue (#17), the language difference may have caused this problem.
Although R was installed in English, my OS is working on Japanese.
Do you have any idea to avoid this issue?
Thank you,
Hi,
I had an error on load_dam() function.
My environments are R 4.4.3, damr 0.3.7, behavr 0.3.3 (Windows 11).
The dataset was from https://github.com/rethomics/rethomics.github.io/raw/source/material/damr_tutorial.zip.
Here's my code:
According to the previous issue (#17), the language difference may have caused this problem.
Although R was installed in English, my OS is working on Japanese.
Do you have any idea to avoid this issue?
Thank you,