[R] choosing a particular object

Adrian DUSA adi at roda.ro
Fri Mar 31 12:27:46 CEST 2006


Thanks, it's exactly what I want.
Adrian

On Friday 31 March 2006 12:59, Adaikalavan Ramasamy wrote:
> Try
>
>  test.fn <- function(obj.name, var.name="q2"){
>
>   stopifnot( is.character(obj.name) & is.character(var.name) )
>   x <- subset( get(obj), select=var.name )
>   table(x)
>  }

-- 
Adrian DUSA
Romanian Social Data Archive
1, Schitu Magureanu Bd
050025 Bucharest sector 5
Romania
Tel./Fax: +40 21 3126618 \
          +40 21 3120210 / int.101




More information about the R-help mailing list