0

I have a large csv file with a list of people with different categories, for example gender. I want to create a pi chart that displays what percentage are male or female for example.

install.packages("ggplot2")
library(ggplot2)

mydata<-read.csv("data.csv")
gender <-mydata[,'gender']

pie(gender)

This is what i have and its telling me gender needs to be postive. help!

also how do i do it with ggplot2?

cactus
  • 69
  • 1
  • 1
  • 8

0 Answers0