On Jun 22, 2012, at 5:09 PM, Joseph Boyer wrote:

DropLikeSAS <- function(x,df) {

                               df[[x]] <- NULL

                               0

                               }

DropLikeSAS("VarName", DataFrameName)

Sorry for the blank message>

> DropLikeSAS <- function(x,df) {
+                                df[[x]] <- NULL
+                               return(df) }
>
> DropLikeSAS("b", df)
    a
1   1
2   2
3   3
4   4
5   5
6   6
7   7
8   8
9   9
10 10
>


David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to