R/floop.repeated.R

Defines functions floop.repeated

Documented in floop.repeated

floop.repeated <-
function(x,y=NULL,m=1,n=1,subjects=NULL,repeated=NULL,subjects.in="all",repeated.in="all" ,...) {

  if (subjects.in[1]=="all" & !is.null(subjects)) {
    subjects <- factor(subjects)
subjects.in <- levels(subjects)}
if (repeated.in[1]=="all" & !is.null(repeated)) {
  repeated <- factor(repeated)
  repeated.in <- levels(repeated)}

  if (is.null(subjects) & is.null(repeated)) {
    subjects2<-NULL
    subset<-NULL}
   else if (is.null(subjects)) {
      subjects2<-repeated
      subset<-repeated %in% repeated.in}
  else if (is.null(repeated)) {
    subjects2<-subjects
    subset<-subjects %in% subjects.in}
  else  {
    subjects2<-list("subjects"=subjects,"repeated"=repeated)
    subset<-((subjects %in% subjects.in) & (repeated %in% repeated.in))}
  floop(x=x,y=y,n=n,m=m,subjects=subjects2,subset=subset,...)
        }

Try the hysteresis package in your browser

Any scripts or data that you put into this service are public.

hysteresis documentation built on May 15, 2021, 1:09 a.m.