Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in R Programming by (50.2k points)

In the header, I have initiated an RDS table in R Studio, and from that, I want to know the field names from that table. But the problem is that I don't know the correct direction or syntax to follow this:

UK_2001 <- readRDS("D:/Census_History/Postcodes/2001_05_MAY_AFPD.rds")

Thanks in advance.

1 Answer

0 votes
by (107k points)

For achieving that first of all you have to see the structure of any R object using str() which will give you the object's type (e.g. data.frame), column names, and column types as well.

str(UK_2001)

But if you just after the names of the columns then colnames() will do. 

If you want to know what is R programming then do check out the blog.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...