Displaying 3 results from an estimated 3 matches for "namesx".
Did you mean:
names
2006 Aug 31
2
Wish: keep names in mapply() result
...======================================================
--- src/library/base/R/mapply.R (revision 39024)
+++ src/library/base/R/mapply.R (working copy)
@@ -3,8 +3,16 @@
FUN <- match.fun(FUN)
dots <- list(...)
+ if(!is.null(names(dots[[1]]))) {
+ isNamed <- TRUE
+ namesX <- names(dots[[1]])
+ } else {
+ isNamed <- FALSE
+ }
+
answer<-.Call("do_mapply", FUN, dots, MoreArgs, environment(),
PACKAGE="base")
+ if(isNamed) names(answer) <- namesX
if (USE.NAMES && length(dots) &&...
2010 May 17
0
(no subject)
...[R] pgmm function
Message-ID: <b2cba0.35fc.128a41e3684.Coremail.dlmsos at 163.com>
Content-Type: text/plain
Dear everyone,
I try to regress a dynamic panel model with pgmm function in the plm
package, but it doesn't work. The error report is "Error in
names(coefficients) <- c(namesX, namest) :
'names' attribute [13] must be the same length as the vector [5]".
My command is:
reg.gmm<-pgmm(dynformula(ln_per_co2ec~ln_per_realgdp+ln_per_realgdp2,lag
.form=list(1,0,0),
log.form=FALSE),data=co2new,effect="individual",model="twosteps",
gmm...
2010 Feb 17
1
side-effects in functions that replace object values and attributes
Hello list,
I encountered some surprising behavior in R and wanted to check to see if I was imagining things. Previously, I thought that replacement/setter operators in prefix notation (e.g., `[<-`(x,1,y) rather than x[1] <- y) did not produce side effects (i.e., left 'x' unchanged), but just realized that this is not the case anymore (or has it always been this way? - I don't