GetAttr: attributes

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/Attributes.R

Description

Get the attributes of case or file.

Usage

1
2
3
4
getAttr(type = c("case", "file"),attrs = svalue(.rqda$.AttrNamesWidget),
        subset)

showSubset(x,...)

Arguments

type

Type of attributes.

attrs

character vector, subset of attributes to retrieve.

subset

when subset is not missing, return subset only.

x

an object from getAttr

...

Not used currently.

Details

You can add and modify the attributes of cases or files. getAttr returns this attributes as a data frame.

Sometimes, you only want to show a subset of files or cases according to their attributes. You can do the subset operation of the result from getAttr and pass it to showSubset, or you can pass a subset argument to GetAttr. The meaning of subset is the same as that in subset function.

Value

For getAttr, when type is "case", it is a data frame with class of "CaseAttr"; when type is "file", it is a data frame with class of "FileAttr". For showSubset, no value is returned, the side-effect is to change the file list or case list in the respective widget.

Note

All the variables in the data frame is of class "character", you need to convert to suitable class when conducting statistical analysis.

Author(s)

HUANG Ronggui

Examples

1
2
3
4
5
6
## Not run: 
attr <- getAttr("case")
showSubset(subset(attr,attribute1==1)) ## assuming there is a variable
named atttribute1 in attr.

## End(Not run)

RQDA documentation built on July 23, 2017, 5:02 p.m.