[R] Problem with uploading library

Joshua Wiley jwiley.psych at gmail.com
Sun Jan 2 02:54:27 CET 2011


Dear Gaja,

If "sp" and "maptools" are not already installed, you'll need to do
that.  It is often recommended that you update your existing packages
before installing new ones.  Once that is done (or if you have
already), then you just need to load the packages, and then R will be
able to find the readShapeSpatial() function (it is in the 'maptools'
package).  Something like this should get you going:

########################
update.packages()
install.packages(c("sp", "maptools"))
require(sp)
require(maptools)
?readShapeSpatial #documentation
towns <- readShapeSpatial("OB/OB.shp")
############################

Hope that helps,

Josh


On Sat, Jan 1, 2011 at 1:25 PM, gaja <gajahorvat at hotmail.com> wrote:
>
> Hello.
>
> I'm new on that forum, so I would use some help... I'm programing with R
> program, have some exercise to do.
>
> So here it goes.
>
> 1. I have to upload two  libraryes "sp" and "maptools"
> 2. This command is troubling me : towns <- readShapeSpatial("OB/OB.shp")
> 3. When I'm pressing f5, there is an error called: Error: could not find
> function "readShapeSpatial"
>
> So, I would use some help. Thanx in advance.
>
> Gaja
> --
> View this message in context: http://r.789695.n4.nabble.com/Problem-with-uploading-library-tp3170455p3170455.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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



More information about the R-help mailing list