Displaying 20 results from an estimated 1000 matches similar to: "displaying percentage in bar plot"
2009 Feb 19
2
counting strings in a column
Dear All,
I have a query : what is the command to count number of repeated words in a
column.
for ex:
a =
oranges
oranges
apples
apples
grape
oranges
apple
pine
the result should be
oranges 3
apples 3
grape 1
pine 1
is there an easy way for this.
Thanks,
Nataraju
GM R & D
Bangalore
--
"No relationship is Static .. You either Step up or Step down"
[[alternative HTML
2009 Apr 29
2
reading csv file : blanks
Hi,
I have a comma seperated data file which has blanks in it. I am trinying to
import it to R using
data1<-read.csv("oa_2006.csv", header = TRUE, sep = ",", quote="\"",
dec=".")
I want the missing values to be "NA". instead R reads them as "U". Any idea
why this happens ?
Thanks in advance.
Regards,
Nataraju
GM
2009 Apr 30
1
factor issue
Hi,
I have a column which I have to convert from factors to numeric. I am using
the command as.numeric(variable) to do this. But when I convert the numeric
value becomes different from factor . for example.
> class(B)
[1] "factor"
> B
[1] 180 <NA> 183 175 163 155 <NA> 188 191 160 170 165 152 170
165
[16] 163 160 163 165 <NA>
> as.numeric(B)
2018 Feb 04
2
help with the plot overlay
Dear R Community,
I recently read an article and found a plot as attached. It has scatterplot, barplot, and error bar. Could anyone help me to figure out what package I can use in R to generate such plot?
Thank you very much for any inputs!
Kind regards,
Ace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2018-02-04 at 6.38.14 AM.png
Type: image/png
2018 Feb 05
0
help with the plot overlay
Hi Ace,
You can do it with plotrix:
library(plotrix)
barpos<-barp(c(1,5,38),width=0.5,col=c("white","lightgray","darkgray"),ylim=c(0,70))
ehplot(c(1,0.8,0.9,0.8,1.1,1,4,3,5,14,3,2,32,27,33,30,50,61),
c(1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3),median=FALSE,add=TRUE,cex=2,
pch=21,bg="white")
dispersion(barpos$x,barpos$y,c(0.1,1,5),lwd=2,arrow.cap=0.03)
2012 Mar 15
1
Bar graph with 2 Y axis
Dear R users,
I need to draw a barplot with 2 Y axis. I have 3 days each of wich having 2 groups (and error bar for each of them). The height of the 3rd day is too tall compared to others. That's why I have to use a second Y axis for that. I am using "barplot2" function of "gplots" library (to be able to add error bars as well). Data and codes currently I am using is
2011 Jul 13
1
venn diagram in percentage
Hi,
I am a beginner with "R" and found a package "venn" to create a venn
diagram. I tried this “venn” function to generate venn diagram, but i need
*Percentage values* instead of counts(frequency) in the oval(circles) of
Venn diagram. Output :
http://r.789695.n4.nabble.com/file/n3664380/output.docx output.docx
I have written have the code as below :
# venn diagram for more
2018 May 22
2
Plot qualitative y axis
Many thanks,
My goal is to make a plott like attached but the Y axis starts in XIV and
end at top in I. Generally for instance in excel X axis is categories but
Y axis is numbers I want the contrary plotted in lines, your last help is
near what I look but barplot is not needed.
Hope you can help me thanks in advance.
2018-05-22 0:58 GMT+02:00 Jim Lemon <drjimlemon at gmail.com>:
> Hi
2009 Nov 19
1
problem post request with RCurl
Hi, I am trying to use a CGI service (Pubchem PUG) via RCurl and am
running into a problem where the data must be supplied via POST - but
I don't know the keyword for the argument.
The data to be sent is an XML fragment. I can do this via the command
line using curl: I save the XML string to a file called query.xml and
then do
curl -d @query.xml
2012 Oct 23
2
plotting multiple variables in 1 bar graph
I'd greatly appreciate your help in making a bar graph with multiple
variables plotted on it. All the help sites I've seen so far only plot 1
variable on the y-axis
Data set:
I have 6 sites, each measured 5 times over the past year. During each
sampling time, I counted the occurrences of different benthic components
(coral, dead coral, sand, etc.) over 5 transects in each site
site
2018 Feb 12
2
What does pct mean?
Hi Carsten,
On 02/11/2018 at 07:46 PM Carsten Bock wrote:
> Hi,
>
> Lost percent (%)....
Are you sure? I'm seeing here:
...........Receive......... .........Transmit..........
Count Lost Pct Jitter Count Lost Pct Jitter RTT....
188K 0 0 0.000 188K 16641K 8809 0.000 0.026
=> This doesn't sound reliable to me: there are 188K packets and 16641K
2018 Feb 13
2
What does pct mean?
On 02/13/2018 at 08:41 AM Floimair Florian wrote:
> No you're reading it wrong.
>
> There are 188K received with no loss, and 16441K transmitted.
This doesn't make any sense to me, either. There can't be more packages
transmitted than received. It's the same codec in and out and it's been
running exactly the same time.
> ...........Receive.........
2010 Sep 11
5
for loop
Hello,
I have a simple question: I want to list numbers 1:k, but if k <1, I hope nothing listed.
how should we do?
k=2
for (i in 1:k) print(i)
[1] 1 # <-correct
[1] 2
k=0
for (i in 1:k) print(i)
[1] 1 #<---- wrong
[1] 0
thanks
jian
[[alternative HTML version deleted]]
2018 Feb 13
3
What does pct mean?
Could this gap in sequence numbers caused by a codec change generate
errors like the one below?
[2018-02-13 12:57:43] WARNING[4917][C-0004c2cb] codec_sangoma.c:
[526559][g722toulaw] Got Seq 15944 but expecting 10106 (time since last
read = 0ms), dropped 5838 packets
On 02/13/2018 01:24 PM, Andres wrote:
> On 2/13/18 11:55 AM, Michael Maier wrote:
>> On 02/13/2018 at 08:41 AM Floimair
2009 Dec 02
2
Extracting vectors from a matrix (err, I think) in RMySQL
I have a query which returns a data set like so:
> salaries
yearID POS pct
1 2009 RF 203
2 2009 DH 200
3 2009 1B 198
4 2009 3B 180
5 2009 LF 169
6 2009 SS 156
7 2009 CF 148
8 2009 2B 97
9 2009 C 86
10 2008 DH 234
11 2008 1B 199
12 2008 RF 197
13 2008 3B 191
14 2008 SS 180
15 2008 CF 164
16 2008 LF 156
17 2008 2B 104
18 2008
2023 Oct 15
2
Create new data frame with conditional sums
Under the hood, sapply() is also a loop (at the interpreted level). As
is lapply(), etc.
-- Bert
On Sun, Oct 15, 2023 at 2:34?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote:
>
> That's very helpful and instructive, thank you!
>
> Jason Stout, MD, MHS
> Box 102359-DUMC
> Durham, NC 27710
> FAX 919-681-7494
> ________________________________
> From: John
2011 Oct 12
3
Applying function to only numeric variable (plyr package?)
My data frame consists of character variables, factors, and proportions,
something like
c1 <- c("A", "B", "C", "C")
c2 <- factor(c(1, 1, 2, 2), labels = c("Y","N"))
x <- c(0.5234, 0.6919, 0.2307, 0.1160)
y <- c(0.9251, 0.7616, 0.3624, 0.4462)
df <- data.frame(c1, c2, x, y)
pct <- function(x) round(100*x, 1)
I want to
2018 Feb 11
2
What does pct mean?
Hello,
could somebody please tell me the meaning of "Pct" as seen in asterisk cli:
...........Receive......... .........Transmit..........
Count Lost Pct Jitter Count Lost Pct Jitter RTT....
Thanks,
Michael
2023 Oct 14
2
Create new data frame with conditional sums
Well, here's one way to do it:
(dat is your example data frame)
Cutoff <- seq(0, .15, .01)
Pop <- with(dat, sapply(Cutoff, \(p)sum(Totpop[Pct >= p])))
I think there must be a more efficient way to do it with cumsum(), though.
Cheers,
Bert
On Sat, Oct 14, 2023 at 12:53?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote:
>
> This seems like it should be simple but I
2005 Jul 26
4
elegant solution to transform vector into percentages?
Hi,
I am looking for an elegant way to transform a vector into percentages of values
that meet certain criteria.
store<-c(1,1.4,3,1.1,0.3,0.6,4,5)
# now I want to get the precentages of values
# that fall into the categories <=M , >M & <=N , >N
# let
M <-.8
N <- 1.2
# In my real example I have many more of these cutoff-points
# What I did is:
out <- matrix(NA,1,3)