Arun, thanks for clearing that up.  I was making assumptions about R that I 
shouldn’t have when it comes to column(variable) assignments.  Hope everyone 
has a good Monday.  BNC

From: arun kirshna [via R] [mailto:ml-node+s789695n4671473...@n4.nabble.com]
Sent: Friday, July 12, 2013 11:59 PM
To: Crombie, Burnette N
Subject: Re: create new matrix from user-defined function

Hi,
One alternative would be to change colnames:

colnames(dat3)<-1:4

 data.frame(MW_EEsDue_ERRORS=with(dat3,`1`[`4`!=rowSums(cbind(`2`,`3`))]))
  #MW_EEsDue_ERRORS
#1             1882
#2             1884
#3             1885

Also, check these:
with(dat3,4)
#[1] 4
 with(dat3,`4`)
#[1]   7   9   5   6 112
with(dat3,7)
#[1] 7
 with(dat3,`7`)
#Error in eval(expr, envir, enclos) : object '7' not found

A.K.




--
View this message in context: 
http://r.789695.n4.nabble.com/create-new-matrix-from-user-defined-function-tp4671250p4671594.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to