is.RdistDf {Rdistance}R Documentation

checkRdistDf - Check RdistDf data frames

Description

Checks the validity of Rdistance nested data frames. Rdistance data frames are a particular implementation of rowwise tibbles that contain detections in a list column, and extra attributes specifying types.

Usage

is.RdistDf(df, verbose = FALSE)

Arguments

df

A data frame to check

verbose

If TRUE, an explanation of the check that fails is printed. Otherwise, no information on checks is provided.

Details

The following checks are performed (in this order):

Other data checks, e.g., for measurement units, are performed later in dfuncEstim, after the model is specified.

Value

TRUE or FALSE invisibly. TRUE means all checks passed. FALSE implies at least one check failed. Use verbose = TRUE to see which.

Examples


data(sparrowDf)
is.RdistDf(sparrowDf)

# Data frame okay, but no attributes
data(sparrowDetectionData)
data(sparrowSiteData)
sparrowDf <- sparrowDetectionData |> 
  dplyr::nest_by( siteID
               , .key = "distances") |> 
  dplyr::right_join(sparrowSiteData, by = "siteID")
is.RdistDf(sparrowDf, verbose = TRUE)



[Package Rdistance version 4.0.5 Index]