bar chart - Sum Barplot of a dataset in R -


lets have csv dataset 100 columns , 200 rows.

every row observation , columns questions measured on likert scale(categorical) 1-5.

now want make one barplot frequency on y-axis , categories 1-5 on x-axis. in end want have clean overview of categories have been used or least without further detail.

sorry, must super easy, if search solutions super fancy multiple or stacked barplots.

so basically, if * defined columns need like:

barplot(dataset$*)   

additional comment:

when aksed questions code above worked 1 column f.e.

barplot(dataset$column1) 

then played bit around , frequency on x-axis , looks weird way, same code. how possible? enter image description here

if change code to:

barplot(xtabs(~dataset$column1)) 

i same result before: enter image description here

barplots of 2 sets

x <- c(0.0001, 0.0059, 0.0855, 0.9082) y <- c(0.54, 0.813, 0.379, 0.35)  # create 2 row matrix x , y height <- rbind(x, y)  # use height , set 'beside = true' pairs # save bar midpoints in 'mp' # set bar pair labels a:d mp <- barplot(height, beside = true,     ylim = c(0, 1), names.arg = letters[1:4])  #height must matrix mp <- barplot(height, beside = true)  # draw bar values above bars text(mp, height, labels = format(height, 4),     pos = 3, cex = .75) 

enter image description here


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -