Coming soon - Get a detailed view of why an account is flagged as spam!
view details
1
Dimnames not displaying names of lists
Post Body

Hi there-

I'm fairly new to R and am following a tutorial from my uni. The test code they gave us is as follows:

visits <- data.frame(bee= c(25,55,25,68),butterfly= c(5,43,24,20))
dimnames(visits) <- list(plant=c("jewelweed","ironweed","JoePyeWeed", "BlackEyedSusan"), visitor=c("bee","butterfly"))

When visits is called again, it is supposed to print out something like this

However, instead, R is printing out the chart except without the visitor and plant labels. Is there any way to fix this or is this just a difference between versions of R? Just making sure I'm not doing anything wrong

Author
Account Strength
100%
Account Age
8 years
Verified Email
Yes
Verified Flair
No
Total Karma
28,185
Link Karma
16,037
Comment Karma
11,610
Profile updated: 4 days ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago