similar to: O(?) access time for rownames/colnames/named dimensions

Displaying 20 results from an estimated 10000 matches similar to: "O(?) access time for rownames/colnames/named dimensions"

2004 Aug 20
3
Loss of rownames and colnames
Hi, I am working on some microarray data, and have some problems with writing iterations. In essence, the problem is that objects with three dimensions don't have rownames and colnames. These colnames and rownames would otherwise still be there in 2 dimensional objects. I need to generate multiple iterations of a 2 means-clustering algorithm, and these objects thus probably need 3
2008 Sep 22
1
how to set rownames / colnames for matrices in a list
Hello, I have another stupid question. I hope you can give me a hint how to solve this: I have a list and one element is again a list containing matrices, all of the same dimensions. Now, I'd like to set the dimnames for all matrices: example code: m1 <- matrix(1:25, nrow=5) m2 <- matrix(26:50, nrow=5) # ... there can be much more than two matrices l <- list() l[[1]] <-
2010 Jul 21
2
Error message: attempt to set rownames on object with no dimensions
Hi there, I am trying to analyze some data using the lme package. In my case there is a variable called Newmarker that can only take 2 values (number 1 or number 2). I have used the as.factor to remark this fact but an error message appears stating: attempt to set rownames on object with no dimensions. Here is the code I have used: *Dataset <- read.table("Data2.txt", header=TRUE,
1998 Nov 09
1
Proposal for discussion: COLNAMES & ROWNAMES
Looking into several different parts of R../src/library/base/R/*.R has led me to the conclusion that quite a bit of code doubling could be saved by using the following two functions whose naming philosophy is derived from that of NROW() & NCOL(): COLNAMES <- function(x) if(is.null(n <- colnames(x))) paste(seq(length=NCOL(x))) else n ROWNAMES <- function(x)
2010 Jul 28
1
How get colnames and rownames in Rcpp method?
Hi all, How get colnames and rownames in Rcpp method? attecthed file : RGui.exe capture my work environment : R version : 2.11.1 OS : WinXP Pro sp3 Thanks and best regards. Young-Ju, Park from Korea [1][rKWLzcpt.zNp8gmPEwGJCA00] [@from=dllmain&rcpt=r%2Dhelp%40r%2Dproject%2Eorg&msgid=%3C20100728211143%2EH
2016 Apr 03
0
row.names(), rownames(), colnames(), names() ...?
Data frames are lists of columns. The names() function is appropriate for lists. It doesn't pay to fall into the trap of thinking that data frames are truly symmetric between columns and rows, because there is a performance penalty for accessing rows that is greater than the cost of accessing columns. With that in mind, thinking of data frames as lists is preferred, so names is preferred
2006 Mar 21
1
rownames, colnames, and date and time
I noticed something surprising (in R 2.2.1 on WinXP) According to the documentation, rownames and colnames are character vectors. Assigning a vector of class POSIXct or POSIXlt as rownames or colnames therefore is not strictly according to the rules. In some cases, R performs a reasonable typecast, but in some other cases where the same typecast also would be possible, it does not. Assigning a
2006 Mar 21
1
rownames, colnames, and date and time
I noticed something surprising (in R 2.2.1 on WinXP) According to the documentation, rownames and colnames are character vectors. Assigning a vector of class POSIXct or POSIXlt as rownames or colnames therefore is not strictly according to the rules. In some cases, R performs a reasonable typecast, but in some other cases where the same typecast also would be possible, it does not. Assigning a
2000 Dec 11
2
row.names, rownames; colnames, no col.names?
There's a bit of a symmetry issue, which may or may not be important (led to 15 seconds of confusion until I got my bearings straight): row.names, rownames; colnames, no col.names? I _NOW_ realize the difference between row.names and rownames, but is there any reason not to have col.names for re-naming columns in a data.frame? (if there is, I don't particular need to know it, but it
2016 Apr 03
2
row.names(), rownames(), colnames(), names() ...?
The help text for row+colnames {base} states: "For a data frame, rownames and colnames eventually call row.names and names respectively, but the latter are preferred." Why are they "preferred"? Why is it names(), not col.names()? I have only ever used names() for vectors - I'm surprised it works on data.frames... IMO this is not great for code readability, thus
2008 Jun 14
1
Correcting the display of colnames and rownames
Dear all, I have a data frame of dimension 720 columns by 360 rows, to which I am trying to add numerical row and column labels to, using the 'sequence' command. The original data, which I read in using 'read.table', had no such labels at all. I've got as far as successfully using the sequence command and getting the labels to display. However, I'm finding that for the
2006 Jul 03
1
rownames, colnames, and date and time
Hi all I was wondering whether there has ever been an update on the rownames and colnames behaviour as described by Eric below? I still get the same behaviour, exactly as described by Eric, on my WinXP installation of R-2.3.0. I also posted a message to r-help on Friday but looking through the online archives it seems to have not made it to the list. I would agree with Eric that a consistent
2005 Jun 15
3
write.table confused by rownames/colnames (PR#7941)
Full_Name: Axel Rasche Version: 2.1.0 OS: Win2000 Submission from: (NULL) (141.14.21.81) Hi, write.table does not accept the second statement with <col.names = NA, row.names = FALSE>. I do not see why this should not be possible. test = matrix(1:4, 2, 2, dimnames = list( c("a","b"), c("c","d") )) write.table(test, file = "test.txt",
2008 Jul 30
1
bug in 'margins' behavior in reshape - cast
according to the documentation of the cast function in the reshape function, I would expect this bit of code from the examples to calculate marginal means over only the 'diet' variable. #Chick weight example names(ChickWeight) <- tolower(names(ChickWeight)) chick_m <- melt(ChickWeight, id=2:4, na.rm=TRUE) cast(chick_m, diet + chick ~ time, mean, margins="diet") But,
2008 Jun 17
1
ggplot facet spacing, wrapping
I'm running into some problems with the spacing of some faceted ggplot plots. I have a number of time series faceted to be one above another, but the scale labels of the y axes all clobber each other at the bottom/top of each. for example, try: qplot(x, y, data = data.frame(x = 1:10, y = 1:10, size = 1:10), facets = size ~ ., size = size) + scale_x_continuous(breaks = 1:10) +
2008 Jun 16
1
sizing non-vector point shapes in ggplot2
Dear all, With normal plotting, one can size a set of points in a plot using a vector argument to cex in the points() function. This works whether you are using one of the standard R symbols (i.e. 19+) or some ascii symbol, such as '/' eg: plot(1:10, 1:10, type='n'); points(1:10, 1:10, cex = 1:10, pch = '/') Trying to make the transition to ggplot2, I find that the
2010 Jun 03
1
need to save generated pdf in public folder
hai im ruby on rails developer, im integrating princely plugin and prince software to my rails application i have generated pdf file successfully using the following code princely = Princely.new() html_string = render_to_string(:template => ''test_methods/ visual_test/generate_report.rhtml'', :layout=> false) send_data(
2007 Dec 21
1
Princely - Prince XML PDF Wrapper Plugin
Recently I was implementing PDF generation for a project utilizing the fantastic library Prince XML (http://www.princexml.com). I came across a blog article with a basic library and helper set for Prince (http:// sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on- rails), which provided a great basis. I wanted to make something a little more generalized and in-keeping the Rails
2008 Sep 17
3
unix-type commandline keystrokes in the windows RGUI
Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]-K/Y) which work in the R commandline in *nix. Does anyone know if there's any way to get similar functionality in the Windows RGUI? I know that as of now, [CTRL]-A and -E do the same as unix (beginning and end of line) and [CTRL]-Y does a
2008 Dec 16
3
Princely Plugin: get nil.size error
Hi All, I want to generate pdf with css. I am using princely plugin. This is code which I written def pdf prince = Prince.new() html_string = render_to_string(:template => ''/users/paid_invoice.pdf.erb'') send_data( prince.pdf_from_string(html_string), :filename => ''some_document.pdf'', :type =>