print: 'print' and 'str' for the output of the function 'adoption'

Description Usage Arguments Value Examples

Description

"adoption" is an S3 class which indicates the output of the function adoption. The commands print and str give some nice output. The command print additionally returns the output within a list.

Usage

1
2
3
4
## S3 method for class 'adoption'
print(x,..., level=0)
## S3 method for class 'adoption'
str(object, ..., give.attr=FALSE)

Arguments

x,object

objects of S3 class "adoption"

level

integer. If level<=0 only a verbal description is given. If level=1 the important parameters of the models are returned. If level>1 simulation results for the models are also returned where they are available.

...

optional arguments that are ignored

give.attr

logical. If TRUE the attributes are also printed.

Value

print

The higher the level, the more details are printed. The print out is also returned within an invisible list. So, z <- print(adoption(), level=1) might make sense.

str

It uses essentially the basic str function. str returns NULL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
RFoptions(cores=2)  ## see package RandomFieldsUtils

## only the model definitions and the simulation result for the
## first model (Bass, '_set_') are returned; no pictures are drawn
str(adoption(gui=FALSE, printlevel=0))

## pictures are drawn and the result returned by 'adoption' is
## reduced to most revelant information (level=1). 'print' also
## returns this information in a list
z <- print(adoption(gui=FALSE), level=1)
str(z, give.attr=FALSE)

adoption documentation built on Sept. 23, 2021, 5:11 p.m.

Related to print in adoption...