[R] Grabbing Column and Row titles

chuck.01 CharlieTheBrown77 at gmail.com
Fri Jan 27 19:54:19 CET 2012


This is true with regard to all things you don't understand in R... use
question mark (?) # this will show you the manual, or help page

?dput  

also, make sure you hit the "quote" button when you reply on this forum so
that people know what you are replying to. 

I used dput() to create the following (see previous post):

x <- structure(list(a = c(0L, 1L, 0L), b = c(1L, 0L, 1L), c = c(0L,
1L, 0L)), .Names = c("a", "b", "c"), class = "data.frame", row.names =
c("a",
"b", "c")) 

now see what "x" is: 

> x
  a b c
a 0 1 0
b 1 0 1
c 0 1 0 


now use dput():

> dput(x)
structure(list(a = c(0L, 1L, 0L), b = c(1L, 0L, 1L), c = c(0L, 
1L, 0L)), .Names = c("a", "b", "c"), class = "data.frame", row.names =
c("a", 
"b", "c"))

Now if you paste this in your post, people can easily "play" around with
your data and try to help. 

Good luck with your endeavors. 




Rambler1 wrote
> 
> Thank you very much I will try this and see how it goes. Also what do you
> mean by using dput() to post? I'm new to the blog. Than you again.
> 



--
View this message in context: http://r.789695.n4.nabble.com/Grabbing-Column-and-Row-titles-tp4332136p4334377.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list