Forum

Home / Forum
Please or Register to create posts and topics.

Error in convert.times(times., fmt) : format h:m:s may be incorrect

Hi,

I'm a new user of FishResp and I am encountering an issue when I try to apply the import.meas function on converted data (using the convert.rMR function to convert from % O2 sat to mg/L O2).  I keep getting the following error message:

Error in convert.times(times., fmt) : format h:m:s may be incorrect
In addition: Warning messages:
1: In unpaste(times, sep = fmt$sep, fnames = fmt$periods, nfields = 3) :
54300 entries set to NA due to wrong number of fields
2: In unpaste(times, sep = fmt$sep, fnames = fmt$periods, nfields = 3) :
54300 entries set to NA due to wrong number of fields
3: In convert.times(times., fmt) : NAs introduced by coercion
4: In convert.times(times., fmt) : NAs introduced by coercion

The data were collected using two 4-channel (total of 8 channels) Loligo respirometry systems and the AutoResp program.

Below is the code I'm using.  Any ideas as to the problem would be greatly appreciated!

Thanks!

H

setwd("C:/Users/hgalbraith/Documents/Projects/DRWI/Physiology/Respiration/R_Analysis")
set.seed(1234)
library(lattice)
library(respirometry)
library(mclust)
library(chron)
library(rMR)
library(rJava)
library(FishResp)

Yellow<-convert.rMR(import.file="yellow.winter.raw.txt",export.file="Yellow.Converted.txt",n.chamber=8, logger="AutoResp", DO.units.in="pct", DO.units.out="mg/L",salinity=0,bar.press = 98.069816, bar.units.in="kpa")
Fish.info<-input.info(ID=c("eel1", "eel2", "con3", "eel4", "con5", "eel6", "eel7", "eel8"), Mass=c(57.9,32.5,0,47.5,0,15.1,36.7,35.8), Volume=c(650,650,650,650,650,650,650,650), DO.unit="mg/L")
Yellow.converted <- import.meas("Yellow.Converted.txt", info.data = Fish.info, logger = "AutoResp", n.chamber = 8, date.format = "DMY", start.measure = "1/31/2019/11:45:00 AM", stop.measure = "1/31/2019/11:45:00 PM", plot.temperature = TRUE, plot.oxygen = TRUE)

Hi,

Thanks for contacting us! Could you send your raw data you were trying to import to fishresp[at]gmail.com?

I will respond here after that ASAP.

Best wishes,

Sergey

 

Yes, I tried to do this in my original message, but I can't find an option to attach a file.  Am I missing it?  I also tried to use the "insert image" button to send you a screen capture of my data, but that doesn't appear to be working for me either (unless you can see it on your end?).

Hi again,

Your code is totally fine except two things. First, I suppose you use "MM-DD-YYYY" format, so the date format in the function "import.meas" should be changed from:

date.format = "DMY"

to:

date.format = "MDY"

Second, as you want to extract specific time period while importing raw data, the values in parameters "start.measure" and "stop.measure" should be presented in the 24-hours time format "HH:MM:SS" without date (e.g. "13:45:00"):

Yellow.converted <- import.meas("Yellow.Converted.txt", 
                                info.data = Fish.info, 
                                logger = "AutoResp", 
                                n.chamber = 8, 
                                date.format = "MDY", 
                                start.measure = "11:45:00", 
                                stop.measure = "12:20:51", 
                                plot.temperature = TRUE, 
                                plot.oxygen = TRUE)

All raw data can be imported automatically, if you do not specify "start.measure" and "stop.measure" parameters (for multi-day experiments too).

If your experiment lasts for several days and an R error appears when you specify start and stop time of your experiment, you can remove unnecessary rows of raw data in Excel and then load all the data to FishResp. We understand that it is probably not the most convenient solution, thus will try to add your format (with dates and AM/PM) for "start.measure" and "stop.measure" parameters in the future.

Thank you for reporting about this issue!

Please, let us know if this solution works or not. We will be glad to help you.

Best wishes,
Sergey

P.S.: We did not provide an option to attach files here, because we wanted to secure experimental data of FishResp users (as this forum is public). Thus, we requested to send raw data to our official e-mail.

P.P.S.: However, the uploading file service works now, but keep in mind that uploaded files will be also available for other visitors of the website. Otherwise, please send files by email. Thank you for this idea!