Closed atcogswell closed 7 years ago
Does it work if you do
plot(as.ctd(test))
?
The problem is that it doesn't know that it's a CTD file. It just knows it has time and other stuff, so it tries a stack of timeseries plots.
I get as below when I convert with as.ctd()
:
The problem with ylim
is that some of the data "columns" are all NA
values. I will change the code to detect that. I learned of that problem by using summary(test)
, which showed (in part):
* Data
Min. Mean Max. Dim. OriginalName
scan 748 6823.2 11211 153 CNTR_01
pressure [dbar] 3 79 155 153 PRES_01
temperature [°C, IPTS-68] 1.1863 2.6757 6.5404 153 TEMP_01
conductivity [S/m] 0.6325 0.67582 0.78447 153 CRAT_01
temperature2 [°C, IPTS-68] 1.2299 2.6764 6.5465 153 TEMP_02
conductivity2 [S/m] 0.66428 0.71131 0.7847 153 CRAT_02
altimeter [m] NA NA NA 153 ALTB_01
fluorometer [μg/l] NA NA NA 153 FLOR_01
oxygenVoltage [V] 2.2209 2.736 2.8973 153 OXYV_01
OK as.ctd did the trick. I've done this before but it must have slipped my mind.
A
I changed the arg in my updated plot method, so now a person can use either plot(odf, blanks=TRUE)
or plot(odf, blanks=FALSE)
, and in neither case will an error result.
PS. I just noticed that read.oce()
autodetects that this is a CTD file, so that might be why you were confused, @atcogswell. The idea is that read.oce()
does its best to detect types, but that read.X()
returns something of type X
... that's why read.odf()
does not return a CTD type, in this case, but read.oce()
does.
Short summary of problem
I receive this error when I try to plot a ctd profile using oce:
Details (optional)
I can see the data and metadata for the ODF file after it is saved as a variable but the error results on plot. many other ODF files plotted fine in a loop I had created before I encountered this problem.
What you did
Associated File
CTD_HUD2011004_017_01_DN.zip
What you expected to happen
normal four panel plot.
What happened
This funky plot was produced:
How urgent is this?
I can skip the files for now but I'd like to know why they won't plot so I can eventually adjust my code, so not urgent.
Output from sessionInfo()