search for: columm

Displaying 5 results from an estimated 5 matches for "columm".

Did you mean: column
2006 Jul 27
2
Vector extracted from a matrix. How can I specify dimensions in as.matrix?
...vector is extracted from a matrix, its dimension is NULL. In this case the transposed dimension is correct, but you'll see the next example, that if a row was extracted, the dimension would be wrong: initialmatrix <- matrix(1:9,3,3) extractedvector <-initialmatrix[,1] # extract first columm as vector textractedvector <-t(extractedvector)#transposed dim(extractedvector) #NULL!!!! <- not working dim(textractedvector)#1x3 as expected I have tried to transform the extracted vector as.vector and as.matrix. as.vector does not give the what I want (still NULL) and as.matrix can't...
2004 Oct 03
2
Computing and testing transition probabilities?
...83, 82, 83), f= sample(1:3, 10, replace=T) ) print(D) What I'd like to do is locate situations where a firm is observed for two consecutive years, and put together conditional probabilities of state transition. Expressed as counts, putting time $t$ as the rows and time $t+1$ as the columms, I'd like to get the table: 1 2 3 1 1 2 1 3 1 1 1 For example, this says that we only observe one situation (in this data) where f=1 and then we got to see the next year, and in that year f was 3. So we have a 100% probability of going from 1 -> 3. In the cas...
2011 Oct 27
2
creating vector os zeros for simulations (beginner's question)
Dear R helpers,   I know this is a simple task, but I'm new to R and I'm still havind difficulties with the language. I want to create 30 vectors to be used in a simulation, each with 1 columm and 5 lines, of random numbers N(0,1). What I tried was this:   N=150 u2<-rep(1:150,0) u2<-list(matrix(0,5)) u2 for(i in 1:N) { u2[i]<-rnorm(5) } u2 ### also tried this: N=150 u2<-rep((matrix(0,5)),30) u2 for(i in 1:N) { u2[i]<-rnorm(5) } u2   The problem is none of this gives me...
2005 May 24
4
Table Help
...t: 5/24/2005 4:33 PM Importance: Normal I have a very large table that I want to add some of the certain rows. The table is as follows: Username1 2 Username1 4 Username2 6 Username2 10 Username3 12 Username3 10 Username3 16 Etc .... The data is sorted by Column 1 (Ie the username) then by columm 2 (The numbers). I want to combine the rows so it would be as follows: Username1 6 Username2 16 Username3 38 Is there easy way using a feature like bind to sum all of collumn two where column 1 is the same? Thanks! Ben
2004 Dec 07
4
Importing vector graphics into R
Dear R users, I know of the possibility to import bitmaps via the nice pixmap library. But if you later on create a PDF it is somewhat disappointing to have such graphics bitmapped. Is there a trick (via maps?) to import a vector graphic and have them plotted onto a graph? My searching attempts in the searchable r-help archive did not seem to result in anything useful... Cheers, hinrich