[R] Display data by condition

jim holtman
Thu, 16 Mar 2017 20:19:18 -0000

you are probably missing a comma:

View(data[data$fact > 5000, ])


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

On Thu, Mar 16, 2017 at 11:16 AM, Juan Ceccarelli Arias <jfca283 at
gmail.com>
wrote:

> Hello,
> I need to show the observations of a data set only if the earn more than
> $5000 (fact is its name in the date set). I use this:
>
> View(data[data$fact>5000])
>
> The code above shows nothing. No error or message at all.
> What am i doing wrong?
> Thanks for your help and time.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.