From 0d958ab6f84b569b5437f231c56004890c4ae23b Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 27 Sep 2016 17:50:34 +0200 Subject: Make the chents package optional --- pkg/R/endpoint.R | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/R/endpoint.R') diff --git a/pkg/R/endpoint.R b/pkg/R/endpoint.R index 68e47f7..314acd2 100644 --- a/pkg/R/endpoint.R +++ b/pkg/R/endpoint.R @@ -41,6 +41,9 @@ endpoint <- function(chent, raw = FALSE, signif = 3) { + if (!is(chent, "chent")) { + stop("Please supply a chent object as created using the package 'chents' available from jrwb.de") + } ep_list <- chent$chyaml[[medium]][[type]] if (!is.na(lab_field[1])) { ep_list <- ep_list[[lab_field]] -- cgit v1.2.1