From c39db16efd2d3c914b7490e696f9496ac5017ee3 Mon Sep 17 00:00:00 2001 From: AndreasRaencker Date: Tue, 18 Apr 2017 22:18:47 +0200 Subject: [PATCH] replaced representation() function by slots argument The representation() function is no longer useful, since the arguments slots and contains to setClass are now recommended. --- Classes_and_Methods/Classes_and_Methods.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes_and_Methods/Classes_and_Methods.Rmd b/Classes_and_Methods/Classes_and_Methods.Rmd index 08c7365..17cf73d 100755 --- a/Classes_and_Methods/Classes_and_Methods.Rmd +++ b/Classes_and_Methods/Classes_and_Methods.Rmd @@ -278,8 +278,8 @@ Creating new classes/methods is usually not something done at the console; you l ```{r polygon_1, tidy = FALSE} library(methods) setClass("polygon", - representation(x = "numeric", - y = "numeric")) + slots = c(x = "numeric", y = "numeric") +) ``` - The slots for this class are `x` and `y`