Meta tags:
Headings (most frequently used words):
classes, s3, s4, that, contain, objects, s3part, description, usage, arguments, functions, contained, and, conversion, mechanisms, references, see, also, examples, methods, package, documentation, browse, packages, we, want, your, feedback,
Text of the page (most frequently used words):
the (118), class (106), #object (61), for (51), classes (36), and (29), methods (27), that (26), from (26), objects (21), with (16), #functions (15), method (15), s3part (14), will (14), function (12), documentation (11), slots (11), mlm (11), s3class (11), this (10), package (10), generic (10), contain (10), corresponding (9), slot (9), create (9), use (9), not (9), can (8), have (8), basic (8), definition (8), vector (8), has (8), are (8), packages (7), setoldclass (7), data (7), but (7), some (7), value (7), formal (6), definitions (6), defined (6), new (6), matrix (6), two (6), fit2 (6), also (6), part (6), usually (6), contained (6), other (5), list (5), used (5), call (5), sepal (5), may (5), see (5), registered (5), returned (5), false (5), stricts3 (5), replacement (5), code (4), your (4), you (4), language (4), inherited (4), version (4), setclass (4), coercing (4), names (4), methodslist (4), versions (4), argument (4), fit (4), contains (4), character (4), xlm (4), section (4), attributes (4), arguments (4), only (4), example (4), type (4), true (4), returns (4), information (3), provide (3), find (3), what (3), its (3), test (3), about (3), show (3), all (3), set (3), represent (3), representation (3), generate (3), associated (3), non (3), defunct (3), initialize (3), name (3), iris (3), myreg (3), title (3), subclass (3), eps (3), extending (3), expression (3), different (3), these (3), been (3), return (3), bit (3), whether (3), extend (3), array (3), which (3), extends (3), always (3), case (3), slotsfroms3 (3), classdef (3), embedding (2), remove (2), website (2), github (2), support (2), should (2), want (2), run (2), rdrr (2), home (2), improve (2), page (2), content (2), validity (2), internally (2), selection (2), substitutedirect (2), signature (2), style (2), inheritance (2), superclass (2), group (2), super (2), specific (2), utilities (2), reference (2), managing (2), shell (2), types (2), methodwithnext (2), additional (2), skeleton (2), file (2), dispatch (2), general (2), deprecated (2), linearmethodslist (2), check (2), get (2), getclass (2), description (2), without (2), internal (2), empty (2), including (2), certain (2), datasets (2), width (2), length (2), petal (2), identical (2), xfit (2), computations (2), invoking (2), conversion (2), way (2), one (2), attribute (2), string (2), expressions (2), they (2), when (2), off (2), interpretation (2), iss4 (2), rather (2), than (2), registering (2), same (2), might (2), below (2), equivalent (2), cases (2), work (2), created (2), called (2), s4class (2), isxs3class (2), stored (2), otherwise (2), strict (2), underlying (2), proxy (2), needclass (2), recommended (2), close, more, customizing, embed, read, snippets, copy, clipboard, add, following, snippet, personal, blog, ian, mutexlabs, com, issue, tracker, tweet, rdrrhq, note, technical, individual, contact, authors, feedback, forge, bioconductor, cran, browse, online, submit, extra, info, optional, suggestion, looking, looks, wrong, builtin, special, zbasicfunslist, validobject, control, tracing, traceclasses, report, testinheritedmethods, structures, structureclasses, envrefclass, stdrefclass, specified, showmethods, setsclass, register, old, save, setmethod, actions, loading, setloadactions, specify, explicitly, setis, setgroupgeneric, setgeneric, union, setclassunion, setas, kinds, selectsuperclasses, extension, relations, sclassextension, s4groupgeneric, rmethodutils, construct, prototype, removemethod, fields, treated, oop, refclass, rclassutils, promptmethods, promptclass, objectswithpackage, structure, nonstructure, nextmethod, utility, plus, compatibility, methodutilities, methodsupport, methods_for_s3, methods_for_nongenerics, methods_details, methoddefinition, localized, based, localrefclass, elements, languageel, unevaluated, languageclasses, sealed, issealedmethod, introduction, inheritedslotnames, manage, implicit, implicitgeneric, look, hasarg, given, getpackagename, getmethod, tools, genericfunctions, genericfunction, fix, saved, previous, fixprevious, findmethods, findclass, source, evalsource, environment, environmentclass, representing, emptymethodslist, signatures, dotsmethods, using, creating, line, classrepresentation, classname, compute, adjacency, superclasses, classestoam, classes_details, combine, columns, rows, cbind2, coerced, cancoerce, current, callgeneric, basicclasses, force, belong, regressing, variables, others, species, regression, shows, declared, numeric, machine, double, examples, chambers, john, 2016, chapman, hall, chapters, particularly, references, mechanism, partially, via, much, usable, form, even, another, take, turn, into, meaningful, operate, safest, ways, ensure, full, multi, implied, known, provided, friendlier, alternative, virtual, respectively, addition, attempt, conversions, valid, indicates, treat, coming, tested, latter, however, does, checking, very, every, detail, handled, correctly, ass4, mechanisms, somewhat, arbitrary, treats, those, assuming, incorrect, cause, confusion, disastrous, better, strategy, stick, explicit, thus, creates, hold, strings, such, possibly, sort, nearly, frame, defines, essentially, except, differences, single, barely, possible, access, automatically, there, containing, guaranteed, relevant, any, according, specifically, holding, currently, defaults, whatever, was, calls, easier, readers, understand, constructs, eliminating, formally, turning, consistency, generality, works, appeared, require, remaining, apply, default, retains, allowed, removed, most, supplied, own, usage, where, evaluates, slightly, rare, need, distinguished, modern, needed, program, standard, expected, both, coerce, either, regular, calling, described, here, browser, docs,
Text of the page (random words):
s3part s4 classes that contain s3 classes rdrr io find an r package r language docs run r in your browser home r documentation methods s3part s4 classes that contain s3 classes s3part s4 classes that contain s3 classes s3part r documentation s4 classes that contain s3 classes description a regular s4 class may contain an s3 class if that class has been registered by calling setoldclass the functions described here provide information about contained s3 classes see the section functions in modern r these functions are not usually needed to program with objects from the s4 class standard computations work as expected including method selection for both s4 and s3 to coerce an object to its contained s3 class use either of the expressions as object s3class as object s3 where s3class evaluates to the name of the contained class these return slightly different objects which in rare cases may need to be distinguished see the section contained s3 objects usage s3part object stricts3 false s3class s3class object isxs3class classdef slotsfroms3 object the replacement versions of the functions are not recommended create a new object from the class or use the replacement version of as s3part object stricts3 false needclass value s3class object value arguments object an object from some class that extends a registered s3 class or a basic vector matrix or array object type for most of the functions an s3 object can also be supplied with the interpretation that it is its own s3 part stricts3 if true the value returned by s3part will be an s3 object with all the s4 slots removed otherwise an s4 object will always be returned for example from the s4 class created by setoldclass as a proxy for an s3 class rather than the underlying s3 object s3class the character vector to be stored as the s3 class slot in the object usually and by default retains the slot from object but an s3 superclass is allowed classdef a class definition object as returned by getclass the remaining arguments apply only to the replacement versions which are not recommended needclass require that the replacement value be this class or a subclass of it value for s3part the replacement value for the s3 part of the object for s3class the character vector that will be used as a proxy for class x in s3 method dispatch functions s3part returns an object from the s3 class that appeared in the contains argument to setclass if called with stricts3 true s3part constructs the underlying s3 object by eliminating all the formally defined slots and turning off the s4 bit of the object with stricts3 false the object returned is from the corresponding s4 class for consistency and generality s3part works also for classes that extend the basic vector matrix and array classes a call to is equivalent coercing the object to class s3 for the strict case or to whatever the specific s3 class was for the non strict case the as calls are usually easier for readers to understand s3class returns the character vector of s3 class es stored in the object if the class has the corresponding s3class slot currently the function defaults to class otherwise isxs3class returns true or false according to whether the class defined by classdef extends s3 classes specifically whether it has the slot for holding the s3 class slotsfroms3 returns a list of the relevant slot classes or an empty list for any other object the function slotsfroms3 is a generic function used internally to access the slots associated with the s3 part of the object methods for this function are created automatically when setoldclass is called with the s4class argument usually there is only one s3 slot containing the s3 class but the s4class argument may provide additional slots in the case that the s3 class has some guaranteed attributes that can be used as formal s4 slots see the corresponding section in the documentation of setoldclass contained s3 objects registering an s3 class defines an s4 class objects from this class are essentially identical in content to an object from the s3 class except for two differences the value returned by class will always be a single string for the s4 object and iss4 will return true or false in the two cases see the example below it is barely possible that some s3 code will not work with the s4 object if so use as x s3 objects from a class that extends an s3 class will have some basic type and possibly some attributes for an s3 class that has an equivalent s4 definition e g data frame an extending s4 class will have a data part and slots for other s3 classes e g lm an object from the extending s4 class will be some sort of basic type nearly always a vector type e g list for lm but the data part will not have a formal definition registering an s3 class by a call to setoldclass creates a class of the same name with a slot s3class to hold the corresponding s3 vector of class strings new s4 classes that extend such classes also have the same slot set to the s3 class of the contained s3 object which may be an s3 subclass of the registered class for example an s4 class might contain the s3 class lm but an object from the class might contain an object from class mlm as in the xlm example below r is somewhat arbitrary about what it treats as an s3 class ts is but matrix and array are not for classes that extend those assuming they contain an s3 class is incorrect and will cause some confusion not usually disastrous but the better strategy is to stick to the explicit class thus as x matrix rather than as x s3 or s3part x s3 and s4 objects conversion mechanisms objects in r have an internal bit that indicates whether or not to treat the object as coming from an s4 class this bit is tested by iss4 and can be set on or off by ass4 the latter function however does no checking or interpretation you should only use it if you are very certain every detail has been handled correctly as a friendlier alternative methods have been defined for coercing to the virtual classes s3 and s4 the expressions as object s3 and as object s4 return s3 and s4 objects respectively in addition they attempt to do conversions in a valid way and also check validity when coercing to s4 the expression as object s3 can be used in two ways for objects from one of the registered s3 classes the expression will ensure that the class attribute is the full multi string s3 class implied by class object if the registered class has known attribute slots these will also be provided another use of as object s3 is to take an s4 object and turn it into an s3 object with corresponding attributes this is only meaningful with s4 classes that have a data part if you want to operate on the object without invoking s4 methods this conversion is usually the safest way the expression as object s4 will use the attributes in the object to create an object from the s4 definition of class object this is a general mechanism to create partially defined version of s4 objects via s3 computations not much different from invoking new with corresponding arguments but usable in this form even if the s4 object has an initialize method with different arguments references chambers john m 2016 extending r chapman hall chapters 9 and 10 particularly section 10 8 see also setoldclass examples an mlm object regressing two variables on two others sepal as matrix datasets iris c sepal width sepal length fit lm sepal petal length petal width species data datasets iris class fit s3 class mlm lm a class that contains mlm myreg setclass myreg slots c title character contains mlm fit2 myreg fit title sepal regression for iris data fit2 shows the inherited mlm object and the title identical s3part fit2 as fit2 mlm class as fit2 mlm the s4 class mlm class as fit2 s3 the s3 class c mlm lm an object may contain an s3 class from a subclass of that declared xlm setclass xlm slots c eps numeric contains lm xfit xlm fit eps machine double eps xfit s3class c mlm lm methods as force an object to belong to a class basicclasses classes corresponding to basic data types callgeneric call the current generic function from a method cancoerce can an object be coerced to a certain s4 class cbind2 combine two objects by columns or rows classes s4 class documentation classes_details class definitions classestoam compute an adjacency matrix for superclasses of class classname class names including the corresponding package classrepresentation class class objects documentation using and creating on line documentation for classes and dotsmethods the use of in method signatures emptymethodslist class internal class representing empty methods list environmentclass class environment evalsource use function definitions from a source file without findclass find class definitions findmethods description of the methods defined for a generic function fixprevious fix objects saved from r versions previous to 1 8 genericfunction class generic function objects genericfunctions tools for managing generic functions getclass get class definition getmethod get or test for the definition of a method getpackagename the name associated with a given package hasarg look for an argument in the call implicitgeneric manage implicit versions of generic functions inheritedslotnames names of slots inherited from a super class initialize methods methods to initialize new objects from a class introduction basic use of s4 methods and classes is is an object from a class issealedmethod check for a sealed method or class languageclasses classes to represent unevaluated language objects languageel elements of language objects linearmethodslist class class linearmethodslist localrefclass localized objects based on reference classes methoddefinition class classes to represent method definitions methods s4 class documentation methods defunct defunct functions in package methods methods deprecated deprecated functions in package methods methods_details general information on methods methods_for_nongenerics methods for non generic functions in other packages methods_for_s3 methods for s3 and s4 dispatch method skeleton create a skeleton file for a new method methodslist methodslist objects methodslist class class methodslist defunct representation of methods methods package formal methods and classes methodsupport additional support functions for methods methodutilities utility functions for methods and s plus compatibility methodwithnext class class methodwithnext new generate an object from a class nextmethod call an inherited method nonstructure class a non structure s4 class for basic types objectswithpackage class a vector of object names with associated package names promptclass generate a shell for documentation of a formal class promptmethods generate a shell for documentation of formal methods rclassutils utilities for managing class definitions refclass objects with fields treated by reference oop style removemethod remove a method representation construct a representation or a prototype for a class rmethodutils method utilities s3part s4 classes that contain s3 classes s4groupgeneric s4 group generic functions sclassextension class class to represent inheritance extension relations selectsuperclasses super classes of specific kinds of a class setas methods for coercing an object to a class setclass create a class definition setclassunion classes defined as the union of other classes setgeneric create a generic version of a function setgroupgeneric create a group generic version of a function setis specify a superclass explicitly setloadactions set actions for package loading setmethod create and save a method setoldclass register old style s3 classes and inheritance setsclass create a class definition show show an object showmethods show all the methods for the specified function s or class signature class class signature for method definitions slot the slots in an object from a formal class stdrefclass class envrefclass structureclasses classes corresponding to basic structures substitutedirect substitutedirect testinheritedmethods test for and report about selection of inherited methods traceclasses classes used internally to control tracing validobject test the validity of an object zbasicfunslist list of builtin and special functions what can we improve the page or its content looks wrong i can t find what i m looking for i have a suggestion other extra info optional submit improve this page r package documentation rdrr io home r language documentation run r code online browse r packages cran packages bioconductor packages r forge packages github packages we want your feedback note that we can t provide technical support on individual packages you should contact the package authors for that tweet to rdrrhq github issue tracker ian mutexlabs com personal blog embedding an r snippet on your website add the following code to your website remove this copy to clipboard for more information on customizing the embed code read embedding snippets close
|