STAT 509: Q and A
Search
everywhere
only in this topic
Advanced Search
RLab2 sim_streak bar plot
Classic
List
Threaded
♦
♦
Locked
7 messages
brice
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
RLab2 sim_streak bar plot
When i populate my bar plot, the x-axis is not labeled and i'm not sure what i am looking at since its set up different then the kobe bar plot. Can someone help me figure out how i can get these frequency tables' data.
Darth Knight
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: RLab2 sim_streak bar plot
Can you show me the code you have used for the bar plot?
brice
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: RLab2 sim_streak bar plot
> sim_basket <- sample(outcomes, size = 133, replace = TRUE, prob = c(0.45,0.55))
> table(sim_basket)
sim_basket
H M
62 71
brice
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: RLab2 sim_streak bar plot
> sim_streak <- calc_streak(sim_basket)
> barplot(sim_streak)
Darth Knight
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: RLab2 sim_streak bar plot
How about "barplot(table(sim_streak))" instead of "barplot(sim_streak)"?
This might work in this case.
brice
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: RLab2 sim_streak bar plot
Thanks, that works perfect. And now i see that that is how it did in the previous part of the assignment
Darth Knight
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: RLab2 sim_streak bar plot
No trouble.
I believe so. There might be another way for doing this.
But, this seems just fine.
Free forum by Nabble
Edit this page