search for: rnames

Displaying 20 results from an estimated 74 matches for "rnames".

Did you mean: names
2013 Aug 27
1
Rename the package published on CRAN
Hello Folks, I have an R package published on CRAN and I want to rename it for the next version, something like from "rName" to "rNAME". I have read the CRAN policy, but did not find any topic regarding to this. So does anybody know whether there is any CRAN policy for this? Thanks! Best, C -- View this message in context:
2010 Feb 09
3
subset in a matrix
...ransform the matrix to a data set using as.data.set(). The help indicates that the subset function can be applied to matrixes and data sets. I am wondering if anyone has seen a similar problem before. am I using the correct syntax? n = 15 m = 5 cnames = paste("x",1:m,sep="") rnames = 1:n z = matrix(rnorm(n*m),n,m,dimnames =list(rnames,cnames)) Thanks, Jorge test = subset(z,x1 < 0, select = c(cnames)) -- View this message in context: http://n4.nabble.com/subset-in-a-matrix-tp1474958p1474958.html Sent from the R help mailing list archive at Nabble.com.
2010 Feb 22
1
rownames cannot allocate vector of size
...ws, when I do the following to duplicate the structure of a large numeric matrix called matrix1: matrix2 <- matrix(0,nrow=nrow(matrix1),ncol=ncol(matrix1)) and then rownames(matrix2) <- rownames(matrix1) I get a "cannot allocate vector of size xxMb" error but if I instead do: rnames <- list() rnames <- rownames(matrix1) matrix2 <- matrix(0,nrow=nrow(matrix1),ncol=ncol(matrix1),dimnames=rnames) I get no error. Of course both approaches work in R on Unix without memory limits. But I'm intrigued about the apaprent difference in memory usage/allocation for the tw...
2010 Mar 22
1
sets package: converting a set to data frame?
...st started using nice package "sets" and I wonder if there are utilities to convert (some) sets to data frame (as in the example below) > library(sets) > a <- gset(elements = list(e('A', 0.1), e('B', 0.8))) > lst <- as.list(a) > nr <- length(lst) > rnames <- character() > for (i in 1:nr) rnames[i] <- lst[[i]] > df <- data.frame(row.names=rnames) > df$memberships <- attr(lst, 'memberships') > a {"A" [0.1], "B" [0.8]} > df memberships A 0.1 B 0.8 > Best regards, Ryszard --- R...
2008 Jun 17
2
Reshape or Stack? (To produce output as columns)
Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: > columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)). > rnames <- sprintf("%.2f", seq(from = -89.75, to = 89.75, length = 360)) > colnames(Jan) <- columnnames > rownames(Jan) <- rnames A sample of the data looks like this: > head(Jan) -179.75 -179.25 -178.75 -178.25 -177.75 -177.25 -176.75 -176.25 -175.75 -89.75 -56.9 -...
2008 Apr 13
1
SPSS to R Data file conversion
I wrote a little routine to convert multiple spss data files (as data frames) to R data files. The code is as follows: # list=dir(pattern=".sav") library(foreign) for (i in 1:length(list)){ # The saved data frame will be dat dat=read.spss(list[i],to.data.frame=TRUE) name=substring(list[i],1,nchar(list[i])-4) rname=paste("../R/",name,".rda",sep="") # This
2012 Mar 15
1
Bar graph with 2 Y axis
Dear R users,   I need to draw a barplot with 2 Y axis. I have 3 days each of wich having 2 groups (and error bar for each of them). The height of the 3rd day is too tall compared to others. That's why I have to use a second Y axis for that. I am using  "barplot2" function of "gplots" library (to be able to add error bars as well). Data and  codes currently I am using is
2017 Mar 20
2
IO error when writing to disk
...rc/io.c =================================================================== --- src/library/utils/src/io.c (r?vision 72357) +++ src/library/utils/src/io.c (copie de travail) @@ -1120,12 +1120,23 @@ for(int i = 0; i < nr; i++) { if(i % 1000 == 999) R_CheckUserInterrupt(); if(!isNull(rnames)) - Rconn_printf(con, "%s%s", - EncodeElement2(rnames, i, quote_rn, qmethod, - &strBuf, sdec), csep); + + if(Rconn_printf(con, "%s%s", EncodeElement2(rnames, i, quote_rn, qmethod, &strBuf, sdec), csep) < 0) { + error(_("IO error, canno...
2002 Jun 21
1
naming things in functions
...substitute(datamat)), j, ".", i, sep = "") pL = PercentsMat( sepclusters[[k]], pL, all ) } PercentsMat <- function(clusters, percentsmatrix, ltype){ . . . result = rbind( percentsmatrix, newpercents ) rnames = c(dimnames(percentsmatrix)[[1]], deparse(substitute(clusters))) numrows = length(rnames) numcols = dim(result)[2] } res = matrix(result, nrow = numrows, ncol = numcols, dimnames = list(rnames, NULL)) return(res) } Some actual output of SummaryMat: $pL [,...
2012 Dec 17
1
Code works standalone, yet same code fails when part of package
Hi I'm missing something here but I cannot figure out what. What I can see is that the same code works when I load it via source(...) yet fails when I execute it after loading the package I have built (which includes the code. Below is a transcript of my R session. First I load the code from a file, using source(). Then I execute it fine. Then I remove the function object, I load the
2018 Jul 05
0
write.table with quote=TRUE fails on nested data.frames
...col(x) } nocols <- p == 0L if (is.logical(quote)) quote <- NULL else if (is.numeric(quote)) { if (any(quote < 1L | quote > p)) stop("invalid numbers in 'quote'") } else stop("invalid 'quote' specification") rn <- FALSE rnames <- NULL if (is.logical(row.names)) { if (row.names) { rnames <- as.character(d[[1L]]) rn <- TRUE } } else { rnames <- as.character(row.names) rn <- TRUE if (length(rnames) != nrow(x)) stop("invalid 'row.names' specification&quo...
1999 Jun 15
0
FIX for smbtar zero length files... (Cont :)
(Erm, sorry about that...) I was talking about errors of the type: Got 0 bytes. The problem was sporatic, and seemed to be load/speed based. That is, the faster the Linux box, the more errors we had. A look through clitar.c led me to a solution. Currently, clitar.c is written to pad a file with zeros if a file read error occurs. This is normal. All of our errors were of the 0 byte length
2020 Aug 25
1
smbclient mask command seems not to work the same way with recurse ON for mget and mput
Dear all. I would like to propose a possible way to make mget and mput behave more or less the same way, rather that just changing documentation. Please, bear in mind this is a poor attempt coming from a person with no C skills at all, so other than testing that only filtered files are transferred, I have not gone further. Hope at least to have been able not to corrupt any pointer, but I'm
2008 Jul 15
3
Melt (reshape) question
...d tweaking a few things, but with no luck. I've pasted the code below, so that you can see what I've done, and maybe you someone spot a fundamental error of mine, or something that I'm missing. columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)) rnames <- sprintf("%.2f", seq(from = 89.75, to = -89.75, length = 360)) read.table("gpw_pop_density_hd_1995a.asc", colClasses = "numeric", na = "-99") -> PopDens colnames <- columnnames rownames <- rnames library(reshape) PopDens$Latitude <- rown...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
Hi all, This is a client side only implementation of reversed dynamic (SOCKS) TCP forwarding, which means it is compatible with any existing servers have 'remote forward' capability. To establish such forward, use "ssh -R [BIND_ADDRESS:]PORT ...". The server will listen on that port and address and accept SOCKS traffics. Hope this will be useful for you. There was an
2008 Oct 20
2
convert matrix to dataframe with repeating row names
Hi R, I have a matrix x with repeating row names. > dim(x) [1] 862 19 zz<-matrix(0,4,4) rownames(zz)=c("a","a","b","b") data.frame(zz) (?) I need to use x in a linear regression lm(as.formula(paste("final_dat[,5]~",paste(colnames(x),collapse="+"))),x ) this gives me a error Error in
2009 Feb 20
6
write.table
Hello, I tried to turn lists into vectors and then bind them together in order to create a dataframe but if, after this, I try to use the function write.table I get the following error message: Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec, as.integer(quote), : 'list' type not implemented in 'EncodeElement' Here is what I've done: as.vector(c(unique(portate$Anno)))->anno as.vector(loadListPO4)->loadPO4 as.vector(loadListPTG)->loadPTG as.vector(loadListNT)->loadNT as.vector(loa...
2008 Jan 04
2
R2WinBUGS sending variables as factors
...delta0 ~ dnorm(0, 1.0E-6) gamma0 ~ dnorm(0, 1.0E-6) } ##R Code library(R2WinBUGS) library(Rlab) #sampling functions #get a subset of the data to use in the modelling process LearnSamp <- function (dBUGS) # data frame of the variables of interest { rnames<- row.names(dBUGS) sampRows <- sample(rnames,900) learnSamp <- subset(dBUGS,rnames%in%sampRows) } #maybe not needed index.inits <- function () # get data into correct form for R2WinBUGS d <-LearnSamp(dBUGS) YFTCPUE <- d$CPUE Mon...
2020 Jun 29
2
R 4.0.0 rebuild status
On Mon, 29 Jun 2020 at 13:19, Jos? Ab?lio Matos <jamatos at fc.up.pt> wrote: > > On Wednesday, 24 June 2020 10.42.10 WEST I?aki Ucar wrote: > > Thanks, Jos? and Elliott. I can help with reviews. > > > > I attach here a list of batches of CRAN packages to be rebuilt in > > order (batches separated by a blank line), and the script that > > generates it. Hope
2004 Feb 25
2
PWM Help
I saw a Help e-mail related to MLE. Does R have a probability weighted method (PWM) estimator function? I can't seem to find anything on PWM, unless my eyes are playing trick on me. [[alternative HTML version deleted]]