[R-sig-Geo] pieSP: non-finite coordinates
Milan Kilibarda
milan.kili11 at gmail.com
Tue Oct 21 12:34:16 CEST 2014
Dear Jue,
Please try to clearly define a reproducible example, next time.
The problem is column with 0 values. Function pieSP can not generate
coordinates for attributes of zero values.
Best,
Milan
On Tue, Oct 21, 2014 at 12:17 PM, Jue Lin-Ye <jl.iccp at gmail.com> wrote:
> Greetings!
>
> I am working with the following code. I am having an error called
> "non-finite coordinates". May you tell me what does it exactly mean and how
> to fix it?
>
> On the other hand, I see that my original percentages in "pie.chart" is
> changed when converting to "pies" (I have written them both in boldface).
> Why does this happen and how can I fix it?
>
> Thank you in advance!
>
>
>>* pie.chart*
> wana long lat prob1 prob2 prob3 prob4
>
> *[1,] 2125149 3.42 42.42 106 5292 5198 0[2,] 2125147 3.42 42.25
> 15 4241 5205 0*
>> pie.chart<-data.frame(pie.chart)
>> coordinates(pie.chart)<-~long+lat
>> proj4string(pie.chart) <-llCRS
>> pie.chart
> class : SpatialPointsDataFrame
> features : 2
> extent : 3.42, 3.42, 42.25, 42.42 (xmin, xmax, ymin, ymax)
> coord. ref. : +proj=longlat +ellps=WGS84
> variables : 5
> names : wana, prob1, prob2, prob3, prob4
> min values : 2125147, 15, 4241, 5198, 0
> max values : 2125149, 106, 5292, 5205, 0
>>
> pies<-pieSP(pie.chart,zcol=c(paste0("prob",c(1:length(SUB.COL.NAMES)))),max.radius=10000)
> *Error in .local(obj, ...) : non-finite coordinates*
>> *pies*
> class : SpatialPolygonsDataFrame
> features : 8
> extent : 3.298831, 3.540708, 42.16017, 42.47187 (xmin, xmax, ymin,
> ymax)
> coord. ref. : +proj=longlat +ellps=WGS84
> variables : 8
> names : id, wana, prob1, prob2, prob3, prob4, pie, pie2
>
> *min values : 1, 2125147, 10, 489, 5379, 3071, prob1, 1 max
> values : 2, 2125149, 17, 598, 5775, 4718, prob4, 4 *
>>
>
> --
> Jue Lin-Ye
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Dr. Milan Kilibarda
Assistant professor
University of Belgrade,
Faculty of Civil Engineering,
Department of Geodesy and Geoinformatics,
Address: Bulevar kralja Aleksandra 73 11000 Belgrade, Serbia,
Mail: kili at grf.bg.ac.rs
Web: http://www.grf.bg.ac.rs/fakultet/pro/e?nid=168 ; http://dailymeteo.org/
Pub: http://scholar.google.com/citations?user=Zl2MZ3AAAAAJ&hl=en
tel:+381 11 3218630
More information about the R-sig-Geo
mailing list