similar to: maptools: using to sets of information (within two shape files) for one plot

Displaying 20 results from an estimated 5000 matches similar to: "maptools: using to sets of information (within two shape files) for one plot"

2012 Jan 31
3
function: as.integer
dear r-helpers, i created an object named A, which looks like this: A <- c("4.4","1.9","4.1") now i needed to get numbers instead of characters and for this i used the function: as.integer(A) which resulted in: [1] 4 1 4 My question is, why the numbers are rounded or more impotantly if there is a way to keep the decimal numbers? Thank you very much for
2012 Apr 12
3
Reading SPSS: underlying numerical codes
Dear people, I have got a question concerning the underlying numerical codes when reading an SPSS file into R. I used the package foreign and when I look at a variable I get the verbal codes. I would like to know how it is possible to get the underlying numerical codes as output, which are the same as in my SPSS file. Thank you very much in advance for your help! Marion [[alternative HTML
2011 Sep 20
4
open source editor for r for beginners
Hello all, I am looking for an editor for R which has got functions beyond the normal R editor that is included in the program. I had a look at VIM but I think it's difficult if you are just starting programming. Could anyone recommend an editor that is suitable for beginners? Thanks for your help. Marion [[alternative HTML version deleted]]
2011 Sep 16
3
writing data from several matrices in R into one excel-file with several sheets
hello, does anyone know how I can write several matrices from R into one exel-file using different sheets for the different matrices? thank you very much in advance for your help. Marion [[alternative HTML version deleted]]
2011 Sep 16
2
automatic selection of object without loop
Hello, does anyone know the solution to this problem: I imported a dataframe from Spss into R and saved it as an object called "kinderrechte". I have got the following command lines: q1 <- kinderrechte[,"q0007_0001"] l1 <- q0007_0001_l now i would like to be able to change the column name in the first command line (e.g. into q0007_0002) and to get R to automatically
2012 Jan 02
2
syntax for reading into R
dear users, we have got the following question: we have got a text-file looking like this: ... <trkpt lat="48.272000" lon="16.342984"> <ele>387</ele> <time>2012-01-01T15:32:03Z</time> <sat>9</sat> </trkpt> <trkpt lat="48.271909" lon="16.343563"> <ele>381</ele>
2012 Jan 16
3
list: index of the element, that is TRUE
Dear People, I have got the following example for a vector and the index of the TRUE element: Myvector <- c(FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE) which(Myvector) Now I would like to find out the same for a list: Mylist <- list(FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE) ... Does anyone know how to do this? Thank you very much in advance, Marion [[alternative HTML
2012 Jul 24
3
package memisc: recode examples
Dear people, Yesterday I looked at the recode command in the memisc package and ran the following example stated in the manual: x <- as.item(sample(1:6,20,replace=TRUE), labels=c( a=1, b=2, c=3, d=4, e=5, f=6)) print(x) f <- as.factor(x) f recode(f,
2011 Sep 19
2
pasting elements of one character vector together
hello, i am familiar with the paste command with which i can paste for exaple: object <- "Hello" paste(object,"World") now i would like to be able to paste all the elements of the same vector together e.g: object <- c("Hello","World") getting as a result also: "Hello World". Does anyone know the solution to this problem? Thank you
2005 Jan 11
5
global objects not overwritten within function
Dear useRs, I have a function that creates several global objects with assign("obj",obj,.GlobalEnv), and which I need to run iteratively in another function. The code is similar to f <- function(...) { assign("obj",obj,.GlobalEnv) } fct <- function(...) { for (i in 1:1000) { ... f(...) ...obj... rm(obj) #code fails without this line } } I don't understand
2012 Feb 14
2
save objects of own function to workspace
Dear R-helpers, I created an own function which looks like this s_elternmz <- function(Var="balt") { Dg_a<-mz[,c("asbhh","apkz",Var)] colnames(Dg_a)[colnames(Dg_a)=="apkz"]<-"bpkzm" colnames(Dg_a)[colnames(Dg_a)==Var]<-paste(Var,"_m",sep="")
2011 Sep 15
1
Courses in R
Hello, I have a question concerning courses in R in *Vienna, Austria*. Does anyone know where courses in R are offered, that you can do after having attended a course for the basics? Thanks in advance for your help. Marion [[alternative HTML version deleted]]
2011 Oct 11
2
binding all elements of list (character vectors) to a matrix as rows
dear r-users, i have got a problem which i am trying to solve: i have got the following commands: Mymatrix <- matrix(1:9,ncol=3) Z <- list("V1"=c("a","",""),"V2"=c("b","",""),"V3"=c("c","",""),"V4"=c("d","","")) Mymatrix <-
2012 Feb 20
3
Run function several times changing only one argument - without a loop
Dear people, I created a plot which looks like this: Ee1<-matrix(c(88,86,74,62,41),ncol=5) colnames(Ee1)<-c("Lehrer","Lehrerinnen","Klassenkollegen","Klassenkolleginnen","Geschwister") par(las=1) par(mar=c(5,13,4,2)) barplot(Ee1,horiz=T,col="grey85",border="NA",xlim=c(0,100),axes=F) axis(2,pos=10, tick=T, tcl=F,
2012 Feb 16
2
import .csv file into R
Dear r-helpers, I read a .csv file into R with the following command: A<-read.csv2(file="Mappe3.csv") It worked fine, except that I would like to get rid of the points between the words and get spaces instead like I have got in the .csv file. At the moment it looks like the following: habe.mich.gut.mit.KlassenkollegInnen.verstanden hatte.gutes.Verhältnis.zu.Eltern
2011 Sep 19
1
switching off commands within character vector
Hello, could someone help me with this problem?: I would like to create a latex-script inside of a character vector in order to being able to compilate it within latex in the end. if i try the following commands: l1 <- "Hello world" latexscript <- paste("\c",l1,"\c") ... I get an error message. I think the problem is that r sees \c as a command. How can I
2011 Oct 05
6
reporting multiple objects out of a function
Dear folks, I?m trying to build a function to create and make available some variables I frequently use for testing purposes. Suppose I have a function that takes some inputs and creates (internally) several named objects. Say, fun1 <- function(x, y, z) {obj1 <- x; obj2 <- y; obj3 <- z <missing stuff> } Here is the challenge: After I run it, I want the objects to be
2011 Aug 28
2
converting matrix in array
Hi everyone, have a small problem trying to converting a dataset in matrix form to an array. Specifically: data include 3D measurement -x,y,z of 59 points in 36 objects. They are stored as a matrix (x) of 2124 rows and 3 columns. What I want to do is to extract each subject's dataset using an array (b). Accordingly, I tried the following command: b<-array(a,c(59,3,36)). The problem is
2006 Jul 07
3
attach and detach question
I have a large R program that I am constantly running over and over again. At the beginning of this program, I create a hige matrix and a huge dataframe but these are constant. What I mean by constant is that, if I run the program over later, I really should just use the old matrix and dataframe ( if they exist ) that were created in a previous run so that the program doesn't have to spend
2012 Feb 06
2
creating more vectors out of one
Dear R-helpers, I have got a vector which looks like the following: apkz <- c(1,2,3,4,5,6,1,1,2,1,2,3,4) now I am trying to find a way to automatically create several vectors, each starting with the number 1, namely: First vector 1 2 3 4 5 6 Second vector 1 Thrid vector 1 2 Fourth vector 1 2 3 4 Does anyone know how to do that? Thank you very much for your help in advance!