[R] Conditional plot(Lattice)
Henrique Dallazuanna
wwwhsd at gmail.com
Fri Jan 29 12:28:20 CET 2010
Tru this:
xyplot(Value ~ Dim | ifelse(Prof > 50, 1, 0), data = x)
On Fri, Jan 29, 2010 at 5:25 AM, Brima <adamsteve2000 at yahoo.com> wrote:
>
> Hi All,
>
> I am completely new to R. I have the below data and want to create a
> conditional variable say Prof.H as such that it equals 1 if Prof is > 50 and
> 0 otherwise and create a scatter plot of Value and Dim conditional on the
> new variable.
>
> Area Value Dim Prof
> 1 1 145.1 9.5 39.0
> 2 2 128.3 10.1 50.5
> 3 3 121.3 9.4 55.6
> 4 4 134.4 11.6 45.0
> 5 5 106.5 10.3 49.6
> 6 6 111.5 9.5 44.3
> 7 7 132.7 11.2 47.4
> 8 8 126.9 9.0 60.0
>
> Any help is appreciated.
>
> Brima
> --
> View this message in context: http://n4.nabble.com/Conditional-plot-Lattice-tp1413264p1413264.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
More information about the R-help
mailing list