search for: rname

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

Did you mean: name
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: http://r.789695.n4.nabble.com/Rename-the-package-published-on-CRAN-tp4674670...
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 t...
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 ---...
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
...ine 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 uses dat for the saved dataframe rather than name save(dat,file=rname) } This works just fine, but the data frames are all named dat when loaded into Rcmdr. It is not a problem to do an assignment at load time from the command...
2012 Mar 15
1
Bar graph with 2 Y axis
...rror bars as well). Data and  codes currently I am using is below.     ==================================================   means<-matrix(c(2.3, 2.0, 0.0, 3.0, 2.5, 40), nrow=2, byrow=TRUE) SEM<-matrix(c(0.3, 0.2, 0.0, 0.4, 0.3, 10), nrow=2, byrow=TRUE)   CIL<-means-SEM CIU<-means+SEM rname<-c("Gr1", "Gr2") cname<-c("day1", "day2", "day3") rownames(means)<-rname rownames(CIL)<-rname rownames(CIU)<-rname colnames(means)<-cname colnames(CIL)<-cname colnames(CIU)<-cname   library(gplots)      barplot2(means, besid...
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, cann...
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
...ect, I load the package, and execute the same code from the package - and I get an error. Please help! Mick > library(Rsamtools) > source("viRome/R/read.bam.R") > read.bam function(bamfile=NULL, chr=NULL, start=1, end=1e07, what=c("qname", "flag", "rname", "strand", "pos", "qwidth", "mapq", "cigar", "mrnm", "mpos", "isize", "seq"), tag=c("NM"), removeN=TRUE) { which <- RangesList(chr = IRanges(start,end)) names(wh...
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&qu...
1999 Jun 15
0
FIX for smbtar zero length files... (Cont :)
...20; int datalen=0; + /* Zero Byte Error retry setup */ + int zero_retry=0; + int max_zero_retry=5; struct timeval tp_start; GetTimeOfDay(&tp_start); @@ -717,6 +720,8 @@ /* write a tar header, don't bother with mode - just set to 100644 */ writetarheader(tarhandle, rname, finfo.size, finfo.mtime, "100644 \0", ftype); + zero_retry=0; + while (nread < finfo.size && !close_done) { DEBUG(3,("nread=%d\n",nread)); @@ -737,8 +742,15 @@ nread += datalen; if (datalen == 0) { -...
2020 Aug 25
1
smbclient mask command seems not to work the same way with recurse ON for mget and mput
...prompt && !yesno(quest)) { 2356 /* No */ 2357 continue; 2358 } 2359 2360 /* Yes */ 2361 SAFE_FREE(rname); 2362 if (asprintf(&rname, "%s%s", client_get_cur_dir(), lname) < 0) { 2363 break; 2364 } ++ 2365 } else { ++ 2366...
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 <- row...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...decode socks4: user %s/%d", c->self, p, len); len++; /* trailing '\0' */ @@ -1078,7 +1092,7 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) fatal("channel %d: decode socks4: len %d > have %d", c->self, len, have); strlcpy(username, p, sizeof(username)); - buffer_consume(&c->input, len); + buffer_consume(input, len); if (c->path != NULL) { xfree(c->path); @@ -1088,8 +1102,8 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) host = inet_ntoa(s4_req.dest_addr); c->path = xstrdup...
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(lo...
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 Mo...
2020 Jun 29
2
R 4.0.0 rebuild status
...ines. So TH-data is mistakenly dropped. > I noticed it because multcomp depends on it and the compilation failed because R-TH-data > was not yet ported. > > This questions is mainly directed to you, to Elliot and Tom, should we add to the rpm- > macros something that puts Provides(R-rname) or since the naming is more or less the > same we can add manually this for packages for which the R-rname and the Fedora > package diverge... > > > So in this case we would add, either directly or automatically, > > Provides(R-TH.data) > > What do you think? Now, we ha...
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]]