Skip to content
Prev 280712 / 398503 Next

Help with code

Hi
dput(any.object)

puts a structure of this object to console. You can copy it to your email 
and anybody can copy it back to R.
Or you can transfer the structure to file see
?dput, ?dget
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
this line is never true. There is no 2 in a c1.

Maybe you shall really tell us what is your intention with some simple 
example.

Here is a subset of your file c1

my.c1 <- structure(list(HTN = structure(c(2L, 1L, 1L), .Label = c("", 
"Y"), class = "factor"), HTN_FDR = structure(c(2L, 2L, 2L), .Label = c("", 

"Y"), class = "factor"), Dyslipidemia = structure(c(2L, 1L, 2L
), .Label = c("", "Y"), class = "factor"), CAD = c(NA, NA, NA
), CAD_FDR = structure(c(2L, 2L, 1L), .Label = c("", "Y"), class = 
"factor"), 
    Prior_MI = c(NA, NA, NA)), .Names = c("HTN", "HTN_FDR", 
"Dyslipidemia", 
"CAD", "CAD_FDR", "Prior_MI"), row.names = c("1", "5", "9"), class = 
"data.frame")

Forget your complicated code and tell us what is you desired output?

Regards
Petr
c2[i,j]<-"T1D_w"
c2[i,j]<-"T1D_oc"
c2[i,j]<-"Ctrl_noc"
complication
http://www.R-project.org/posting-guide.html