Hello
My data contains following columns:
1st column: Posts (GM, Secretary, AM, Office Boy)
2nd Column: Dept (Finance, HR, ...)
3rd column: Tasks (Open the door, Fix an appointment, Fill the register,
etc.....) depending on the post
4th column: Average Time required to do the task
So the sample data would look like
Posts Dept Task Average time
Office Boy HR Open the door 00:00:09
Secretary Finance Fix an appointment 00.00.30
.... ..... ..... .....
I am trying to represent this data in Graphical format, I tried graphs like
Mosaic plot, etc. But it does not represent the data correctly. My aim is to
check the "amount of time and its variability for groups of tasks"
Thank you in advance
Regards
Sunita
Hi
r-help-bounces at r-project.org napsal dne 18.11.2009 16:01:27:
Yes I tried all the basic ones like box plot, pie chart, etc but the
data
representation isnt that clear.
I agree with Tal. But it partly depends on your data. If you have many
levels and only few time values in each boxplot would not look well. Maybe
you could check also ?xtabs or ?table and/or R graph gallery
http://addictedtor.free.fr/graphiques/ if you find suitable graph.
Regards
Petr
Regards
Our Thoughts have the Power to Change our Destiny.
Sunita
On Wed, Nov 18, 2009 at 7:20 PM, Tal Galili <tal.galili at gmail.com>
wrote:
I would start with
?boxplot
----------------------------------------------
My contact information:
Tal Galili
E-mail: Tal.Galili at gmail.com
Phone number: 972-52-7275845
FaceBook: Tal Galili
My Blogs:
http://www.talgalili.com (Web and general, Hebrew)
http://www.biostatistics.co.il (Statistics, Hebrew)
http://www.r-statistics.com/ (Statistics,R, English)
On Wed, Nov 18, 2009 at 2:47 PM, Sunita Patil <sunitap22 at gmail.com>
wrote:
Thanx
but I am not able to find a graph that wud suit my data
Regards
Our Thoughts have the Power to Change our Destiny.
Sunita
On Sun, Nov 15, 2009 at 8:54 PM, milton ruser <milton.ruser at gmail.com
wrote:
Google "R graph grallery"
Google "R ggplot2"
Google "R lattice"
and good luck
milton
On Sun, Nov 15, 2009 at 7:48 AM, Sunita22 <sunitap22 at gmail.com>
wrote:
Hello
My data contains following columns:
1st column: Posts (GM, Secretary, AM, Office Boy)
2nd Column: Dept (Finance, HR, ...)
3rd column: Tasks (Open the door, Fix an appointment, Fill the
register,
etc.....) depending on the post
4th column: Average Time required to do the task
So the sample data would look like
Posts Dept Task Average
time
Office Boy HR Open the door 00:00:09
Secretary Finance Fix an appointment 00.00.30
.... ..... ..... .....
I am trying to represent this data in Graphical format, I tried
graphs
like
Mosaic plot, etc. But it does not represent the data correctly. My
aim
is
to
check the "amount of time and its variability for groups of tasks"
Thank you in advance
Regards
Sunita
--
View this message in context:
That is not enough information for anyone to suggest a useful plot.
For a start:
* How many observations do you have?
* How many difference posts/departments/tasks?
* Are the variables nested or crossed?
* Have you successfully parsed the time representation into something
R can work with? Is the representation inconsistent as in your
example?
* What is the purpose of the study? What do you want to find out?
Maybe you should meet with a local statistical consultant to discuss
these issues in person. WARNING: you might have to pay - good advice
is not always/seldom/ever free.
Hadley
On Wed, Nov 18, 2009 at 9:53 AM, Sunita Patil <sunitap22 at gmail.com> wrote:
Hello Sir
I had given a sample of my data, As I cannot disclose whole of my data this
is just a sample given
1st column: Posts (GM, Secretary, AM, Office Boy)
2nd Column: Dept (Finance, HR, ...)
3rd column: Tasks (Open the door, Fix an appointment, Fill the register,
etc.....) depending on the post
4th column: Average Time required to do the task
So the sample data would look like
Posts ? ? ? ? ? ?Dept ? ? ? ?Task ? ? ? ? ? ? ? ? ? ? Average time
Office Boy ? ? ?HR ? ? ? ? ? Open the door ? ? ? ? ?00:00:09
Office Boy????? HR?????????? Switch on the lights? 00:00:10
Secretary ? ? ? Finance ? ?Fix an appointment ? 00.00.30
.... ? ? ? ? ? ? ? ? ? .... ? ? ? ? ..... ? ? ? ? ? ? ? ? ? ? ? ? ? ? .....
.... ? ? ? ? ? ? ? ? ? .... ? ? ? ? ..... ? ? ? ? ? ? ? ? ? ? ? ? ? ? .....
.... ? ? ? ? ? ? ? ? ? .... ? ? ? ? ..... ? ? ? ? ? ? ? ? ? ? ? ? ? ? .....
in my data the 1st column is the main category say suppose "Secretary" the
second column is the sub category "HR Dept" the 3rd column is the list of
duties performed by the Secretary from HR dept and 4th column is time
required to perform the duty
so there are many such posts and dept with varied duties and times resp
Regards
Our Thoughts have the Power to Change our Destiny.
Sunita
On Wed, Nov 18, 2009 at 9:15 PM, hadley wickham <h.wickham at gmail.com> wrote:
Yes I tried all the basic ones like box plot, pie chart, etc but the
data
representation isnt that clear.
Given that you have neither provided your data, nor explained what you
are trying to uncover from it, what sort of advice do you expect to
get?
Hadley
--
http://had.co.nz/
I have been using R just very recently, I have gone through this
http://addictedtor.free.fr/graphiques/
a few weeks back but I am not able to understand as to how to choose
the
graph amongst them? Can anyone guide me regarding this?
I'm not sure what you mean, exactly.
Many of those graphs there aren't just "normal" R functions. They are
put together using several commands in order to build the final
picture you see there.
For instance, say you like this graph:
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=145
At the bottom left of the page, you'll find a Source Code section
under "Requirements".
Click the "view" link there:
http://addictedtor.free.fr/graphiques/graphcode.php?graph=145
And that's the code you need to make the graph (it's quite complex,
but there are simpler ones.
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
Hello Sir
I had given a sample of my data, As I cannot disclose whole of my
data this
is just a sample given
1st column: Posts (GM, Secretary, AM, Office Boy)
2nd Column: Dept (Finance, HR, ...)
3rd column: Tasks (Open the door, Fix an appointment, Fill the
register,
etc.....) depending on the post
4th column: Average Time required to do the task
So the sample data would look like
*Posts Dept Task Average time*
Office Boy HR Open the door 00:00:09
Office Boy HR Switch on the lights 00:00:10
Secretary Finance Fix an appointment 00.00.30
.... .... ..... .....
.... .... ..... .....
.... .... ..... .....
in my data the 1st column is the main category say suppose
"Secretary" the
second column is the sub category "HR Dept" the 3rd column is the
list of
duties performed by the Secretary from HR dept and 4th column is time
required to perform the duty
so there are many such posts and dept with varied duties and times
resp
Fine, we see what your data looks like, but what are you trying to
plot?! What do you want to show people about this data?
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
Well, from what you say it seems to me that you could also use Pareto
charts together with some aggregation of data. But it depends on what you
want to show to your audience. Below is some code which I slightly adapted
form original author.
Regards
Petr
#----------------------------------------------------------------------------------------------------------------------
# pareto. Produces a Pareto plot of effects.
#
# Parameters:
# effects - vector or matrix of effects to plot.
# names - vector of names to label the effects.
# xlab - String to display as the x axis label.
# ylab - String to display as the y axis label.
# perlab - Label for the cumulative percentage label.
# heading - Vector of names for plot heading.
#
pareto <- function(effects, names=NULL, xlab=NULL, ylab="Magnitude of
Effect", indicate.percent=TRUE, perlab="Cumulative Percentage",
heading=NULL, trunc.perc=.95, long.names=FALSE,...)
{
# set up graphics parameters, note: set las=2 for perpendicular
axis.
oldpar <- par( mar=c(6, 4, 2, 4) + 0.1 , las=3)
on.exit(par(oldpar))
if( ! is.matrix(effects)) effects<-as.matrix( effects )
for( i in 1:ncol(effects) )
{
if( i==2 ) oldpar$ask<-par(ask=TRUE)$ask
# draw bar plot
eff.ord <- rev(order(abs(effects[,i])))
ef <- abs(effects[eff.ord,i])
names<-as.character(names)[eff.ord]
# plot barplot
# get cumulative sum of effects
sumeff <- cumsum(ef)
m<-max(ef)
sm<-sum(ef)
sumeff <- sumeff/sm
vyber<-sumeff>trunc.perc
suma.ef<-sum(ef[vyber])
sumeff<-c(sumeff[!vyber],1)*m
ef<-c(ef[!vyber],suma.ef)
names<-c(as.character(names[!vyber]),"Dalsi")
ylimit<-max(ef) + max(ef)*0.19
ylimit<-c(0,ylimit)
par( mar=c(6, 4, 2, 4) + 0.1 , las=3)
if (long.names) {
x<- barplot(ef, names.arg=names, ylim=ylimit, xlab=xlab,
ylab=ylab, main=heading[i], plot=F, ...)
x<- barplot(ef, ylim=ylimit, xlab=xlab, ylab=ylab,
main=heading[i], ...)
text(x,ylimit[2]/10, names, srt=90, adj=0, cex=.7)} else {
x<-barplot(ef, names.arg=names, ylim=ylimit, xlab=xlab,
ylab=ylab, main=heading[i], ...)
}
if( indicate.percent == TRUE ){
# draws curve.
lines(x, sumeff, lty="solid", lwd=2, col="purple")
# draw 80% line
lines( c(0,max(x)), rep(0.8*m,2) )
# draw axis labling percentage.
at <- c(0:5)* m/5
axis(4, at=at,
labels=c("0","20","40","60","80","100"), pos=max(x)+.6)
# add axis lables
par(las=0)
mtext(perlab, 4, line=2)
}
} # end for each col
}
#Don Wingate
r-help-bounces at r-project.org napsal dne 18.11.2009 16:17:32:
yes in my data the 1st column is the main category say suppose
"Secretary"
the second column is the sub category "HR Dept" the 3rd column is the
list
of duties performed by the Secretary from HR dept and 4th column is time
required to perform the duty
so there are many such posts and dept with varied duties and times resp.
Regards
Our Thoughts have the Power to Change our Destiny.
Sunita
On Wed, Nov 18, 2009 at 8:42 PM, Petr PIKAL <petr.pikal at precheza.cz>
wrote:
Hi
r-help-bounces at r-project.org napsal dne 18.11.2009 16:01:27:
Yes I tried all the basic ones like box plot, pie chart, etc but the
data
representation isnt that clear.
I agree with Tal. But it partly depends on your data. If you have many
levels and only few time values in each boxplot would not look well.
Regards
Our Thoughts have the Power to Change our Destiny.
Sunita
On Wed, Nov 18, 2009 at 7:20 PM, Tal Galili <tal.galili at gmail.com>
wrote:
I would start with
?boxplot
----------------------------------------------
My contact information:
Tal Galili
E-mail: Tal.Galili at gmail.com
Phone number: 972-52-7275845
FaceBook: Tal Galili
My Blogs:
http://www.talgalili.com (Web and general, Hebrew)
http://www.biostatistics.co.il (Statistics, Hebrew)
http://www.r-statistics.com/ (Statistics,R, English)
On Wed, Nov 18, 2009 at 2:47 PM, Sunita Patil
<sunitap22 at gmail.com>
wrote:
Thanx
but I am not able to find a graph that wud suit my data
Regards
Our Thoughts have the Power to Change our Destiny.
Sunita
On Sun, Nov 15, 2009 at 8:54 PM, milton ruser
<milton.ruser at gmail.com
wrote:
Google "R graph grallery"
Google "R ggplot2"
Google "R lattice"
and good luck
milton
On Sun, Nov 15, 2009 at 7:48 AM, Sunita22 <sunitap22 at gmail.com>
wrote:
Hello
My data contains following columns:
1st column: Posts (GM, Secretary, AM, Office Boy)
2nd Column: Dept (Finance, HR, ...)
3rd column: Tasks (Open the door, Fix an appointment, Fill the
register,
etc.....) depending on the post
4th column: Average Time required to do the task
So the sample data would look like
Posts Dept Task Average
time
Office Boy HR Open the door 00:00:09
Secretary Finance Fix an appointment 00.00.30
.... ..... ..... .....
I am trying to represent this data in Graphical format, I
tried
graphs
like
Mosaic plot, etc. But it does not represent the data
correctly. My
aim
is
to
check the "amount of time and its variability for groups of
tasks"
Thank you in advance
Regards
Sunita
--
View this message in context:
Hello Sir
I have got 150 observations, got 10 posts/ 6 departments/ tasks vary from 5
to 10,
A few of the variables are crossed specially in case of Office boy, where
the tasks are like open the door, put on the lights,
Yes time variable I have used Chron package, so that it works well
My aim for this study is to check the "amount of time and its variability
for groups of tasks"
Its my project work so need to work this out myself if it doesnt work then I
will have to consult a statistician
Thanks for guiding me to put up the question in more clearer way, I will
sure take care next time
Hi Sunita,
You seem to have two aims, one to display the tasks, and the other to
summarize the times. I have been looking at the plot.dendrite function
and it might perform the first task with a bit of rewriting (which it
needs anyway). The second task might be handled by the hierobarp
function. I'll try to work out whether these will do the job in the next
day or two.
Jim