[R-sig-Geo] Errore in sprintf(fmt, ...) ?

Roger Bivand Roger.Bivand at nhh.no
Sat Dec 2 11:16:22 CET 2006


On Fri, 1 Dec 2006, Massimo Di Stefano wrote:

Massimo:

Two deep breaths, it'll work out. Memory may well be a problem, but we 
can't see what is going on without 

1) sessionInfo() for your platform with the packages loaded

2) traceback() after the problem arises

3) do not run this as a script - run it line by line, so that you can 
check things step by step. Run gc() - garbage collector - manually, and 
stay in control as much as possible.

Roger

> hi,
> i'm trying to perform a clustering on a dem (50x50 km
> res=20m)
>  is this is the code:
> 
> 
> require(spgrass6)
> 
> require(cluster)
> 
> gmeta6 <- gmeta6()
> 
> x <-
> readFLOAT6sp(c("er","crosc","longc","slope","profc","minic","maxic"))
> 
> morph <- data.frame(cbind(x$er, x$crosc, x$longc,
> x$slope, x$profc, x$minic, x$maxic))
> 
> morph <- data.frame(cbind(x$er, x$crosc, x$longc,
> x$slope/max(x$slope), x$profc, x$minic, x$maxic))
> 
> names(morph) <-
> c("er","crosc","longc","slope_n","profc","minic","maxic")
> 
> print("perform the clustering")
> 
> morph.clara <- clara(morph, k=5, stand=F)
> 
> x$morph_class <- morph.clara$clustering
> 
> print("send result back to GRASS")
> 
> rast.put6(x,"morph", zcol="morph_class")
> ....
> ......
> but during:
> "perform the clustering"
> 
> i'had this error:
> 
> Errore in sprintf(fmt, ...) : La lunghezza della
> stringa eccede la dimensione del buffer di 8192
> Inoltre: Warning messages:
> 1: perl = TRUE è implementato solo nei locale UTF-8
> 2: perl = TRUE è implementato solo nei locale UTF-8
> 3: perl = TRUE è implementato solo nei locale UTF-8
> 4: perl = TRUE è implementato solo nei locale UTF-8
> 5: perl = TRUE è implementato solo nei locale UTF-8
> 6: perl = TRUE è implementato solo nei locale UTF-8
> 7: perl = TRUE è implementato solo nei locale UTF-8
> 8: La stringa di caratteri verrà probabilmente
> troncata
> Esecuzione interrotta
> 
> if i try the same code on a subregion of my data 
> (about 20x20 km res=20), it works very fine!
> but for a large region i've this error :-(
> 
> obviously i think that is a memory problem, right ?
> (i'm working with a notebook PPC-1.33-512ram)
> my data are  : 7 raster-map on a region of about 50X40
> km at a resolution of 20m.
> is there some wolkaround about the memory problems?
> 
> an other question is:
> what is this :
> Warning messages:
> 1: perl = TRUE è implementato solo nei locale UTF-8
> 2: perl = TRUE è implementato solo nei locale UTF-8
> 3: perl = TRUE è implementato solo nei locale UTF-8
> 4: perl = TRUE è implementato solo nei locale UTF-8
> 5: perl = TRUE è implementato solo nei locale UTF-8
> 6: perl = TRUE è implementato solo nei locale UTF-8
> 7: perl = TRUE è implementato solo nei locale UTF-8
> 
> is it about this line of the code :
> 
> morph.clara <- clara(morph, k=5, stand=F)
> i have an F > false
> 
> 
> frustated for this error, to day i buy a 1 GB memory
> slot for my laptop
> now it have 1,28GB instead the old 512, but i've the
> same error :-(
> damn!damn!....how can i do?
> repeat for a little area (about 20X20 km and res=20m)
> it work fine!
> have you any suggestion?
> is ther a method for look if this error depend from my
> ram or other....?
> thanks foe any suggestion!
> i need your help.
> thanks.
> Massimo
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list