On Wed, 25-Mar-2015 at 03:14PM +0100, Henric Winell wrote:
...
|> Well... Opinions may perhaps differ, but apart from '%>%' being
|> butt-ugly it's also fairly slow:
Beauty, it is said, is in the eye of the beholder. I'm impressed by
the way using %>% reduces or eliminates complicated nested b
I don't understand what you expect. Stacked bar charts add the values together.
Perhaps that is not really how you want to represent these data?
---
Jeff NewmillerThe . . Go Live...
D
Hello,
Below is some simple R code I have used to create a stacked bar chart. However
the y-axis tick marks do not reflect the data. The minimum and maximum data
values I have are 3073351 and 25329814 respectively but the graph has data from
0 and the maximum is different The data file is too
maybe
library(xlsx)
tf <- tempfile()
ami <- "
http://www.ferc.gov/industries/electric/indus-act/demand-response/2008/survey/ami_survey_responses.xls
"
download.file( ami , tf , mode = 'wb' )
ami.data2008 <- read.xlsx( tf , sheetIndex = 1 )
On Wed, Mar 25, 2015 at 5:01 PM, Benjamin Baker wrot
On 25.03.2015 21:15, Joshua N Pritikin wrote:
CRAN check is issuing a complaint,
Found the following calls to data() loading into the global environment:
File ‘OpenMx/R/MxAlgebra.R’:
data(omxSymbolTable)
See section ‘Good practice’ in ‘?data’.
Which says "use a file ‘R/sysdata.rda’". So w
Hi
You can use the recordGraphics() function for this (if you are careful).
For example ...
x <- 1:100
y <- x +rnorm(100, 0,10)
plot(x,y, xlab="", main="Shrink and Enlarge This Graph")
abline(0,1 ,lty=2)
recordGraphics(
{
legend(x=grconvertX(1, from = "ndc", to = "user"),
CRAN check is issuing a complaint,
Found the following calls to data() loading into the global environment:
File ‘OpenMx/R/MxAlgebra.R’:
data(omxSymbolTable)
See section ‘Good practice’ in ‘?data’.
I tried placing an rda file in the package's R/ directory, but now I get
a new CRAN check compla
Trying to read and clean up the FERC data on Advanced Metering infrastructure.
Of course it is in XLS for the first two survey years and then converts to XLSX
for the final two. Bad enough that it is all in excel, they had to change the
survey design and data format as well. Still, I’m sorting t
Hi Dave, Bill,
Thank you. That was it!
Best Regards,
Steven
On Mar 25, 2015, at 1:11 PM, David R Forrest wrote:
> I'm away from a computer that can check syntax, but make sure the return is
> outside of the for loop. To my eye it looks inside.
[[alternative HTML version deleted]]
sim.app.wald<-function(B=0.1,min=10,max=50,alpha=0.05){
result<-c(fails=0,n=0)
for(n in min:max){
x<-seq(1,n-1,1)
...
return(result) # indent! see what's wrong?
}
}
Make your indentation (of the return line) correspond to the braces
Hi Dave,
Thank you, but that didn't seem to do it. This code produces the same result:
sim.app.wald<-function(B=0.1,min=10,max=50,alpha=0.05){
result<-c(fails=0,n=0)
for(n in min:max){
x<-seq(1,n-1,1)
fhat<-x/n
se<-sqrt((fhat*(1-fhat
On Mar 25, 2015, at 10:27 AM, Turgidson wrote:
> Apologies for bringing up an old topic, but I am not finding working answers.
> I am also an R newbie, so I'm still on the steep part of the learning curve.
>
> I have a character string : "0.5 1 2 3 4"
>
> I need to convert it to a vector of n
Greets,
I'm trying to iteratively find solutions to a problem given a range of options.
Code is as follows:
sim.app.wald<-function(B=0.1,min=10,max=50,alpha=0.05){
result<-c(fails=0,n=0)
for(n in min:max){
x<-seq(1,n-1,1)
fhat<-x/n
No, you don't need the commas. All data in R are vectors, and as.numeric
handles vectors just fine.
Keep in mind that what you see on the console is not necessarily what is in
memory... the syntax you see or use to input data is just that... a tool for
helping you communicate. For example, ther
Apologies for bringing up an old topic, but I am not finding working answers.
I am also an R newbie, so I'm still on the steep part of the learning curve.
I have a character string : "0.5 1 2 3 4"
I need to convert it to a vector of numbers. I get as far as strsplit(),
which gives me
"0.5"
On Mar 25, 2015, at 8:45 AM, David Winsemius wrote:
>
> On Mar 25, 2015, at 4:55 AM,
> wrote:
>
>> Dear all,
>>
>> Finally I have tried three different options to integrate a function in a 3D
>> volume. Here
>> I show a test example. The volume is the box [0,100] x [0,100] x [0,100] and
Dear R-Helpers
I am attempting to get a legend in the outer margins of a graph that has a
similar flexibility to mtext(), within base graphics. This is used in a
tool that will end up with graphs of many different coordinates, exported
in many different sizes. I'm trying to come up with a genera
On Mar 25, 2015, at 4:55 AM, wrote:
> Dear all,
>
> Finally I have tried three different options to integrate a function in a 3D
> volume. Here
> I show a test example. The volume is the box [0,100] x [0,100] x [0,100] and
> the
> function is
>
> nfw(d) = 4/((d/5)*(1+(d/5))^2)
>
> where
ylim(0%,100%) is not valild. It should be ylim(0,100).
Jeff Newmiller
Sent by: "R-help"
03/25/2015 11:14 AM
To
"BenedettaB24 ." , "r-help@r-project.org"
,
cc
Subject
Re: [R] Graph with ggplot2.
It is difficult to read your code because the HTML format messes it up,
but I think you
You need to define limits as defined in the data. ylim(0, 1) instead of
ylim(0%, 100%)
ylim(0%, 100%) is incorrect R syntax.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> i used this command three times,
clearly not exactly this, if it's stopped working ...
> but now is not working, the error reported is:
> Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines),
> y=Percentage,
> vjust=-0.5, fill=Prostate )) + geom_bar(colour="black", stat="identity
It is difficult to read your code because the HTML format messes it up, but I
think your ggplot function call is missing a parenthesis between fill=Prostate
and the + sign.
---
Jeff NewmillerThe ..
Perhaps you had forgotten to use header=TRUE when you read the data in.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
On 2015-03-25 09:40, Patrick Connolly wrote:
On Sun, 22-Mar-2015 at 08:06AM -0800, John Kane wrote:
|> Well, first off, you have no variable called "Name". You have lost
|> the state names as they are rownames in the matrix state.x77 and
|> not a variable.
|>
|> Try this. It's ugly and I have
Thanks, Jeff. I tried this previously by using a header in my data file
(and 'header=TRUE'), but for some reason, that did not seem to work.
Creating a 'names' vector as you suggested did solve the problem, though.
Thank you!
Loren
2015-03-24 23:19 GMT-04:00 Jeff Newmiller :
> You MUST put al
Dear all,
I want to run ggplot2 in one of my file.
I do this:
mergefile<- read.csv("path of my file/name.csv")
library(ggplot2) to import my library
ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
fill=Prostate )) + geom_bar(colour="black", stat="identity",
position=positi
> # create formula (without comma index on column names) fm <-
> as.formula(paste("resp ~", paste(colnames(mydata)[1:3110],
> collapse="+")))
>
> # call neuralnet
> out <- neuralnet(fm,data=mydata, hidden = 4, lifesign = "minimal",
> linear.output = FALSE, threshold = 0.1)
Does neuralnet not re
> Call:
> lm(formula = curr_data[[tmin_col]] ~ curr_data[[year_col]] -
> 1 | curr_data[[month_col]])
First, this is not a sensible formula for lm; lm() does not use '|' to denote
grouping. It would be a valid formula for xyplot, in which | specifies grouping
variables. In lm(), '|' is sim
I am very grateful Dear Charles.
Soheila
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-projec
On 25/03/2015 12:30, Frederic Ntirenganya wrote:
Hi all,
I am doing analysis which involves fitting a line on trellis plot.
But the commands below (or at least the output from them) are not
plotting commands.
The
factor is month. As you know a year has 12 months and I expect to get
12 l
Hi all,
I am doing analysis which involves fitting a line on trellis plot. The
factor is month. As you know a year has 12 months and I expect to get
12 lines one for each month. I am getting the following results which
is different to my expectation. Am I have to do anything about the
data? Any su
Soheila,
Set the name of the last column and remove the comma indexing the column
names. It is a vector and therefore doesn't need a comma for indexing.
Also, after loading your dataset I realized you also have invalid column
names. The mixes between hyphens and underscores makes the as.formula
On 25/03/2015 7:55 AM, lluis.hurt...@uv.es wrote:
> Dear all,
>
> Finally I have tried three different options to integrate a function in a 3D
> volume. Here
> I show a test example. The volume is the box [0,100] x [0,100] x [0,100] and
> the
> function is
>
> nfw(d) = 4/((d/5)*(1+(d/5))^2)
>
Dear all,
Finally I have tried three different options to integrate a function in a 3D
volume. Here
I show a test example. The volume is the box [0,100] x [0,100] x [0,100] and
the
function is
nfw(d) = 4/((d/5)*(1+(d/5))^2)
where d is the distance between each point in the box to the point (
On Sun, 22-Mar-2015 at 08:06AM -0800, John Kane wrote:
|> Well, first off, you have no variable called "Name". You have lost
|> the state names as they are rownames in the matrix state.x77 and
|> not a variable.
|>
|> Try this. It's ugly and I have no idea why I had to do a cbind()
You don't ha
Dear Charles,
I rewrote code :
library("neuralnet")
resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1))
mydata <- cbind(data24_2, resp)
dim(mydata)
> 20 3111
fm <- as.formula(paste("resp ~ ", paste(colnames(mydata)[,1:3110],
collapse="+")))
> Error in colnames(mydata)[, 1:3110] : incorrect number
36 matches
Mail list logo