[R] Loading EDF files

Eric Berger er|cjberger @end|ng |rom gm@||@com
Fri May 3 18:52:46 CEST 2019


Hi Mariano,
The problem appears to be that samples[[sn]] has zero length (or is NULL).
Consider the following code which gives the same error message.

x <- 1:10
x[1:5] <- as.numeric(NULL)
Error in x[1:5] <- as.numeric(NULL) : replacement has length zero

HTH,
Eric

On Fri, May 3, 2019 at 4:32 PM Marcelo Mariano Silva <
marcelomarianosilva using gmail.com> wrote:

> Dear All,
>
> I have tried to load an EDF file using the code below and I received the
> following massage :
>
> Error in signals[[sn]]$signal[nextInCSignal[sn]:lastOne] <- samples[[sn]] :
>
> replacement has length zero
>
> What this massage means?
> Is there any problem with the EDF file?
>
> Code used:
> hdr <- readEdfHeader("/lasse/neurobit/edf/medidas/g1/G1medida1.edf");
>
>
> df_id1 <- readEdfSignals(hdr, signals = "All", from = 0, till = Inf,
> physical = TRUE, fragments = TRUE, recordStarts = TRUE, mergeASignals =
> TRUE, simplify = TRUE);
>
>
> Any help would be highly appreciated.
>
>
> Mariano
>
>
> >
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list