Ron: That was exactly what I was looking for!
Thank you Ron!
Also thanks to Ulrik and Jim who tried to help. I learned a lot!
Dagmar
Am 15.07.2016 um 12:48 schrieb Crump, Ron:
Hi Dagmar,
I want the names of the weeks on the x axis and the animals on the y-axis.
Then, the shading of the
Hi Dagmar,
I want the names of the weeks on the x axis and the animals on the y-axis.
Then, the shading of the barplot is supposed to represent the number of
data
per week.
If I understand the above correctly, and using the example dataset
constructed by Ulrik:
datframe <-
Hi Dagmar,
Maybe your want something like this?
datframe<-data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon" ),
week =c("1","2", "3", "1","2", "3"),
numberdata =c("5","12", "1", "6","2", "5"))
datframe
datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
library(plotrix)
Dear Dagmar,
must the numberdata be character?
Here are tew solutions. The first solution summarise before plotting and
the second does everything in the plot
library("dplyr")
library("ggplot2")
datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"
), week =c("1","2", "3",
Dear all, dear Jim,
Thank you for trying to help Jim. Unfortunately it didn't solve my problem.
I want the names of the weeks on the x axis and the animals on the y-axis.
Then, the shading of the barplot is supposed to represent the number of
data per week.
Any help?
Dagmar
Am 13.07.2016
Hi Tagmarie,
This might help:
datframe$numberdata<-as.numeric(as.character(datframe$numberdat))
library(plotrix)
barcol<-color.scale(datframe$numberdat,extremes=c("black","white"))
barplot(matrix(datframe$numberdat,nrow=2,byrow=TRUE),
beside=TRUE, horiz=TRUE,names.arg=paste("Week",1:3),
Dear all,
I hope someone can help with my problem:
I have a dataframe like this:
datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"
), week =c("1","2", "3", "1","2", "3"), numberdata =c("5","12", "1",
"6","2", "5"))
datframe
I want to create a graph like the attached
7 matches
Mail list logo