I don't understand how your labelling technique was supposed to work.
Below is my reproducible example of how I would approach this problem.
When you post next time, try to follow this method of making something we
can put into our fresh R environment and see your problem directly.
---
library(
I always use geom_text when I want to add text or labels to a plot.
HTH
Ulrik
Shawn Way schrieb am Mo., 5. Dez. 2016, 23:58:
> That’s precisely what I’m trying to accomplish.
>
> Shawn Way, PE
>
> From: John Kane [mailto:jrkrid...@yahoo.ca]
> Sent: Monday, December 05, 2016 4:47 PM
> To: Shawn
I've never seen stat_bin used like that. What exactly is it supposed to do.
It looks like you are trying to label the %ages in each piece of the bar.
On Monday, December 5, 2016 2:17 PM, Shawn Way wrote:
I have the following data in which I'm trying to summarize in a stacked bar
plo
That’s precisely what I’m trying to accomplish.
Shawn Way, PE
From: John Kane [mailto:jrkrid...@yahoo.ca]
Sent: Monday, December 05, 2016 4:47 PM
To: Shawn Way ; r-help@r-project.org
Subject: Re: [R] Using ggplot2 to plot percentages in bar chart.
I've never seen stat_bin used like that. What
You can also try using ggplot2 to generate the plot:
> library(tidyr)
> library(ggplot2)
> data <- gather(mldf,Element,Value,2:4)
> p <- ggplot(data,aes(x=factor(Element),y=Value,group=Sample,color=Sample))
> p+geom_line()
Shawn Way, PE
-Original Message-
From: R-help [mailto:r-help-boun
Typo: "lazy evaluation" not "lay evaluation."
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Dec 5, 2016 at 1:46 PM, Bert Gunter wrote:
> Sorr
Sorry, hit "Send" by mistake.
Inline.
On Mon, Dec 5, 2016 at 1:34 PM, Bert Gunter wrote:
> Inline.
>
> -- Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" com
Inline.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Dec 5, 2016 at 9:53 AM, Rui Barradas wrote:
> Hello,
>
> Inline.
>
> Em 05-12-2016 17:09
Hi Paul,
I suggest forgetting about SPSS and using R directly. Getting started
with R is easier than ever thanks to the growing number of tutorials,
workshops, mailing lists and forums.
Best,
Ista
On Mon, Dec 5, 2016 at 4:09 PM, Paul Bernal wrote:
> Hello everyone,
>
> I have been trying really
Hello everyone,
I have been trying really hard to use the SPSS Modeler´s R modeling node to
generate forecasts without success. I personally think the R integration in
SPSS Modeler is kind of poor, since you are only allowed to work with R
version 2.15.2.
Is there anyone who has worked time serie
Hi Maria,
Perhaps something like this:
mldf<-read.table(text="Sample Cu Zn Mn
M1 1 5 10
M2 2.5 11 8
M3 1.15 11 12
M4 2 4 30
M5 8 15 35",
header=TRUE)
matplot(mldf,type="b",pch=c("C","Z","M"))
Jim
On Mon, Dec 5, 2016 at 11:25 PM, Maria Lathouri via R-help
wrote:
> Dear al
> On Dec 5, 2016, at 9:53 AM, Rui Barradas wrote:
>
> Hello,
>
> Inline.
>
> Em 05-12-2016 17:09, David Winsemius escreveu:
>>
>>> On Dec 5, 2016, at 7:29 AM, John Sorkin wrote:
>>>
>>> Rui,
>>> I appreciate your suggestion, but eliminating the deparse statement does
>>> not solve my probl
Since 2008, Microsoft (formerly Revolution Analytics) staff and guests have
written about R every weekday at the
Revolutions blog: http://blog.revolutionanalytics.com
and every month I post a summary of articles from the previous month of
particular interest to readers of r-help.
And in case you
Hello,
Inline.
Em 05-12-2016 17:09, David Winsemius escreveu:
On Dec 5, 2016, at 7:29 AM, John Sorkin wrote:
Rui,
I appreciate your suggestion, but eliminating the deparse statement does not
solve my problem. Do you have any other suggestions? See code below.
Thank you,
John
mydf <-
dat
I have the following data in which I'm trying to summarize in a stacked bar
plot showing the percentages as a label in the bar.
The data is as follows:
> head(data)
MASTERPAK2LT MASTERPAK4LT MASTERPAK7LT MASTERPAK10LT MASTERPAK22LT
1XXX X
Hello,
For some reason I got moderation in reply to Bert's post so I'll retry.
Get rid of 'xx', keep 'yy':
frame[, yy] # this works
Hope this helps,
Rui Barradas
Em 05-12-2016 15:29, John Sorkin escreveu:
Rui,
I appreciate your suggestion, but eliminating the deparse statement does
not solv
Bert is right, that's exactly what I mant.
Rui Barradas
Em 05-12-2016 15:36, Bert Gunter escreveu:
John:
I think you need to re-read about how functions pass arguments and
data frame access works in R.
What Rui meant was to get rid of all the xx stuff and access your column by:
col <- frame[
Dear list;
since I've posted the message below, Simon Urbanek has fixed the problem
(in less than 5 hours, phewww...). The version available on Rforge *is*
installable with OpenSSL 1.1
Note that you'll have to install it with
"install.packages('PKI',,'https://www.rforge.net/')", NOT
install
> On Dec 5, 2016, at 7:29 AM, John Sorkin wrote:
>
> Rui,
> I appreciate your suggestion, but eliminating the deparse statement does not
> solve my problem. Do you have any other suggestions? See code below.
> Thank you,
> John
>
>
> mydf <-
> data.frame(id=c(1,2,3,4,5),sex=c("M","M","M","F"
Given the error messages, it looks like the OP may already have updated and
needs to update their code to match. Perhaps reading ?qplot or learning how to
use the ggplot function instead of qplot should be next steps.
--
Sent from my phone. Please excuse my brevity.
On December 5, 2016 8:05:36
I do not use ggplot2 myself but I think my first action would be to
update you version of ggplot2 and possibly also of R.
On 05/12/2016 10:28, Daniel wrote:
Dear the R Community,
I just encountered an error while using ggplot2 and the qplot function
(please see below for the warnings and error
This post actually has nothing to do with R programming per se, and
hence is off topic here. Please post elsewhere, e.g. on
stats.stackexchange.com or other list that discusses "mediation
models".
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and
John:
I think you need to re-read about how functions pass arguments and
data frame access works in R.
What Rui meant was to get rid of all the xx stuff and access your column by:
col <- frame[, yy]
That *does* work.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that pe
Rui,
I appreciate your suggestion, but eliminating the deparse statement does not
solve my problem. Do you have any other suggestions? See code below.
Thank you,
John
mydf <-
data.frame(id=c(1,2,3,4,5),sex=c("M","M","M","F","F"),age=c(20,34,43,32,21))
mydf
class(mydf)
myfun <- function(frame,
I forgot to say that I've commented out the line
# This does not work.
#col <- xx[,"yy"]
Rui Barradas
Em 05-12-2016 15:17, Rui Barradas escreveu:
Hello,
You don't need xx <- deparse(substitute(...)), since you are passing the
data.frame to your function. Just use
myfun <- function(frame,var
Hello,
You don't need xx <- deparse(substitute(...)), since you are passing the
data.frame to your function. Just use
myfun <- function(frame,var){
[...]
# Nor does this work.
col <- frame[,yy]
print(col)
}
myfun(mydf,age)
myfun(frame = mydf, var = age)
[1] 2 3
I can get the name o
On 05/12/2016 8:31 AM, Watson, David W. (MSFC-ES62) wrote:
I have been trying to download the “patched” version of 3.3.2 from CRAN, but
the version that gets delivered is actually the October Release Candidate
version,
(R version 3.3.2 RC (2016-10-26 r71594). It has been doing this since 3.3.2
I am trying to write a function which, when passed the name of a dataframe and
the name of a column of the dataframe, will allow me to work on the columns of
a dataframe. I can not get my code to work. Please see the code below. Any help
in getting the function to work would be appreciated.
I have been trying to download the “patched” version of 3.3.2 from CRAN, but
the version that gets delivered is actually the October Release Candidate
version,
(R version 3.3.2 RC (2016-10-26 r71594). It has been doing this since 3.3.2 has
been released. Is there a real patched version somewhere
Dear group,
medsens() is a fantastic method for testing sensitivity of mediation
models estimated by the mediate(). (mediation package by Tingley et al;
Version 4.4.5).
However, I'm wondering whether medsens() is also appropriate for
moderated mediation? And if not, is there an alternative proc
Dear Jim,
Thanks to your advice, "Proxy Authentification" window�showed up, however,
I couldn't access to the internet. Error messages are as below.
-- -- ---
> update.packages(ask='graphics',checkBuilt=TRUE)
--- Please select a CRAN m
Hello Adrian,
It all depends on what the structure of the dataset is. For instance, you said
that all your values are betweenn -1 and 1. Do the data rown sum-squared up to
1? How about the means? Are they zero. I guess all this has to depend on the
application and how the data were processed or
Dear list,
It seems that recent changes in openssl somehow broke the installation
or update of the PKI package. This is probably specific of my setup(s)
(Debian testing, updated frequently).
Copy of a mail to Simon Urbanek (PKI maintainer), sent 5 days ago
without reply nor acknowledgement s
Dear the R Community,
I just encountered an error while using ggplot2 and the qplot function
(please see below for the warnings and error), and i have no idea about how
to make changes so that it will work.
Could anyone kindly advise me a bit and help me out here?
Parallel processing usually includes quite a lot of overhead, which is
expensive if the computation itself is quick. This is definitely an
example where the function is too simple to take advantage of
parallelization. Another thing is that your example has some errors,
which makes the effect ev
As far as I can see, the 'internal' method doesn't work for https mirrors
(on my system, anyway). However, the http mirrors still exist (try "
http://cloud.r-project.org/"; for example) so why not just use one of those?
Cheers,
Carina
On 5 December 2016 at 12:27, jim holtman wrote:
> You will
Hi All,
Dear Readers,
I am using openxlsx to export data to Microsoft Excel 2013, 32-Bit, German
Version:
--- schnipp ---
library("openxlsx")
dataset <- structure(
list(
a = c(1126039.81, 45636.44, 14847.41),
b = c(1194447.5,
88310.53, 18699.68),
c = c(1560307.73, 34203
Hi All,
Dear Readers,
I am using openxlsx to export data to Microsoft Excel 2013, 32-Bit, German
Version:
--- schnipp ---
library("openxlsx")
dataset <- structure(
list(
a = c(1126039.81, 45636.44, 14847.41),
b = c(1194447.5,
88310.53, 18699.68),
c = c(1560307.73, 34203
Hi Maria,
What happens is that R plots with boxplots (explaining the horizontal
lines, i.e. boxes with n=1) when the x-variable is a factor.
What you can do is transform your Sample column into numeric and then
plot it, with some adjustment of axis labels.
For example:
datf <- data.frame(Samp
You will probably have to check with your network folks to see what is
possible on your system.
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Mon, Dec 5, 2016 at 6:33 AM, wrote:
> Dear Jim,
>
> Thanks
Dear all
I know that my question is very simple but although I tried to find an answer
online, I couldn't and I am stuck.
I have a dataset of three numerical variables measured in different samples ID.
Something like this:
Sample Cu Zn MnM1 1 5
41 matches
Mail list logo