search for: inlist

Displaying 5 results from an estimated 5 matches for "inlist".

Did you mean: unlist
2010 Apr 24
3
S4 Inheritance of environments
...2) Response to the is.* function seems to indicate that the object does not know of its inheritance. ( Notably, the inherits function works as expected. ) Here is a working illustration: > # LIST > setClass( 'inheritList', contains='list') [1] "inheritList" > inList <- new( 'inheritList' ) > class( inList ) [1] "inheritList" attr(,"package") [1] ".GlobalEnv" > is.list( inList ) # TRUE [1] TRUE > slotNames(inList) # ".Data" [1] ".Data" > inherits(inList, 'list' )...
2010 Nov 07
2
stupid R tricks
Hi all, Just thought I'd post this (maybe) helpful tool I wrote. For people like me who are bad at keeping a clean environment, it's a time-saver. #simple command to get only one type of object in current environment lstype<-function(type='closure'){ inlist<-ls(.GlobalEnv) if (type=='function') type <-'closure' typelist<-sapply(sapply(inlist,get),typeof) return(names(typelist[typelist==type])) } Carl
2007 Jun 26
1
A really simple data manipulation example
...er patient , with lab sodium measurements. It has columns: PATIENT_ID, VISIT_NUM, and SODIUM. DEMO is a dataset with one row per patient, with demographic data. It has columns: PATIENT_ID, GENDER. Here's a simple example, the following paragraph of code is a data processing function (dpf) : inlist LABRESULTS DEMO ; mergeby PATIENT_ID ; if (SODIUM == -9) SODIUM = NULL ; if (VISIT_NUM != 2) deleterow ; select AVERAGE_SODIUM = avg(SODIUM) by GENDER ; sendoff(RESULTS_DATASET) GENDER AVERAGE_SODIUM ; turnoff; // just means end-of-paragraph , version 1.0 won't need this. Can you guess wh...
2010 Dec 17
4
using ls() to find a function
Dear R People: Is there a way to find which objects are functions via ls(), please? I'm sure that there is, but I'm not sure how. Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
2007 Jun 13
3
Awk and Vilno
...trial data preparation and many other data situations, the statistical programmer needs to merge and re-merge multiple input files countless times. A syntax for merging files that is clear and concise is very important for the statistical programmer's productivity. Here is how Vilno does it: inlist dataset1 dataset2 dataset3 ; joinby variable1 variable2 where ( var3<=var4 ) ; Each column in a dataset has a variable name ( variable1, variable2, var3, var4 ). You are merging three input datafiles: dataset1, dataset2, and dataset3. The joinby statement asks for a many-to-many join, rather l...