On Dec 1, 2010, at 1:12 PM, Charles C. Berry wrote:
On Wed, 1 Dec 2010, cmccar...@bmcc.cuny.edu wrote:
Hi,
Suppose I have the following data
name score
Abel88
Baker 54
Charlie77
stored a table called myData.
I want to write a function that will create a table which i
Thank you all for your very fast replies.
I tried Henrique's method (see one of the above posts) , and it works
perfectly!
Thanks again!
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-pass-selection-criteria-in-a-function-tp3067765p3067829.html
Sent from the R help mailin
Try this:
newTable <- function(data, criteria) {
do.call(subset, list(data, substitute(criteria)))
}
On Wed, Dec 1, 2010 at 3:56 PM, wrote:
> Hi,
> Suppose I have the following data
>
> name score
> Abel88
> Baker 54
> Charlie77
>
> stored a table called myData.
>
>
>
On Wed, 1 Dec 2010, cmccar...@bmcc.cuny.edu wrote:
Hi,
Suppose I have the following data
name score
Abel??? 88
Baker? 54
Charlie??? 77
stored a? table called myData.
I want to write a function that will create a table which is a subset of myData
containing those have a score > 7
Hi,
Suppose I have the following data
name score
Abel 88
Baker 54
Charlie 77
stored a table called myData.
I want to write a function that will create a table which is a subset of myData
containing those have a score > 75.
I know I can do this with the following command:
5 matches
Mail list logo