similar to: binding all elements of list (character vectors) to a matrix as rows

Displaying 20 results from an estimated 20000 matches similar to: "binding all elements of list (character vectors) to a matrix as rows"

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
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 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
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]]
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 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 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 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,
2012 May 09
1
barplot: legend: two rows
dear r-helpers, i have got another question: i am using the functions par(xpd=T) legend to create a legend below the x-axis. i used the parameter horiz=T. now i would like to put the elements of the legend in two rows: e.g. if my legend has got 5 elements, i would like 3 elements in one row and the last two elements in the next row. does anyone know how to do that? thank you very much for
2012 Mar 20
1
Remove individual rows from a matrix based upon a list
Dear All, Thanks in advance for any help. I have a square matrix of measures of interactions among individuals and would like to calculate a values from a function (colSums for example) with a single individual (row) excluded in each instance. That individual would be returned to the matrix before the next is removed and the function recalculated. I can do this by hand removing rows based upon
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]]
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="")
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
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!
2012 May 31
1
maptools: using to sets of information (within two shape files) for one plot
Dear all, I am using a shape file containing the information regarding the borders of the PARISHES of Austria. I created a plot with different colours for different percentages of child care institutions. Now I would like to add the information of the COUNTY boundaries to this plot which I have got in another shape file. I would like these boundaries to be shown with bold lines so that they can
2012 Apr 02
1
table: output: all variables in rows
Dear people, I would like to create a table out of a data.frame. How can I determine, which variables are put in the rows and which in the columns? I would like to get all the variables in the ROWS: I am including a simple example: D<-data.frame(age=c(8,9,10),county=c("B","W","W")) the output should have the following structure: 8 B 1 8 W 0 9 B 0 9
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
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,
2009 Jul 20
1
S4 method dispatch with inheritance
Hi, I'm trying to create a new S4 class (myMatrix) which for now just extends dgCMatrix (from package Matrix). Then I want to use "[" which is defined in Matrix. Out of the box with "[" (defined in Matrix) I lose the class information and the result is an object of class dgCMatrix. If I specify a "["-method for myMatrix, it is not used because a signature