[R-sig-Geo] subset() for spatialPointsDataFrame
MacQueen, Don
macqueen1 at llnl.gov
Fri Mar 9 16:27:34 CET 2012
Try
points.df[points.df$value > 0, c('column1','column')]
(or possibly using points.df at data$value instead of points.df$value
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 3/6/12 7:09 AM, "Johannes Radinger" <JRadinger at gmx.at> wrote:
>Hi,
>
>I just wanted to know how I have to use the
>subset() command for a SpatialPointsDataFrame correctly.
>
>I'd like to get all records of the SpatialPointsDataFrame where the
>column "value" is > 0. Furthermore I want to select only two columns of
>that dataframe with these records. The subset command would be:
>
>subset(points.df, value > 0 , select = c(column1, column2))
>
>When I do that I get following error:
>
>Error in subset.SpatialPointsDataFrame(points.df, value > 0, select =
>c(column1, :
> Object 'value' not found
>
>I also tried:
>subset(points.df, points.df["value"] > 0 , select = c(column1, column2))
>
>Error in points.df["value"] > 0 :
> Vergleich (6) ist nur f"ur atomare und Listentypen m"oglich (sorry is
>in German)...
>
>Best regards,
>Johannes
>
>--
>
>Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list