dear memebers,
I am using R in AWS linux instance for my
research. I want to remove certain objects from the global environment to
reduce my EBS cost..for example, I want to remove all objects of class "xts",
"zoo". Is there any way to automate this, instead of
When you understand the strong dependence on how the data controls ggplot,
using it gets much easier. I still have to google details sometimes
though. Note that it can be very difficult to make a weird plot (e.g.
multiple parallel axes) in ggplot because it is very internally
consistent... a
I have the task of producing some boxplot graphics with the requirement
that these have the same general appearance as a set of such graphics
as were produced last year. I do not have access to the code that was
used to produce the "last year" graphics.
There are multiple boxplots per figure
Hmmm. I do get output in the file with the first example, and the second
example is too complicated for me.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
On 7/27/18, 9:56 AM, "R-help on behalf of
Hello,
First of all welcome to R, I hope you enjoy it and that as you go along
it will give less and less troubles.
Now, why would length(56) return 2? It's just one number, a vector of
length 1.
Start by trying it at an R prompt and see the result.
Hope this helps,
Rui Barradas
Às
OMG, Jeff, this is so helpful of you!
Thanks a lot!
On Fri, 27 Jul 2018 at 12:32, Jeff Newmiller
wrote:
> Debugging in R applies one statement at a time. If you want to debug
> within a statement you can "step into" the function calls within the
> statement or you can execute the function
Thanks a lot, Michael!
On Fri, 27 Jul 2018 at 12:12, Michael Dewey wrote:
> Dear Ibrauheem
>
> First try
>
> length(56)
>
> then try
> rnorm()
> using the value you got in stage 1
>
> Michael
>
> On 27/07/2018 16:07, إبراهيم خطاب Ibrauheem Khat'taub wrote:
> > Hi everyone,
> >
> > I am
Thanks a lot, Sarah! Appreciate the help!
On Fri, 27 Jul 2018 at 12:55, Sarah Goslee wrote:
> You can readily do it yourself:
>
> x <- 56
> length(x) # hint: why do you expect length(56) to be 2?
> rnorm(length(x))
> x + rnorm(length(x))
>
> For more complicated problems, the debugger is
Thanks a lot, Rui!
On Fri, 27 Jul 2018 at 12:02, Rui Barradas wrote:
> Hello,
>
> First of all welcome to R, I hope you enjoy it and that as you go along
> it will give less and less troubles.
>
> Now, why would length(56) return 2? It's just one number, a vector of
> length 1.
>
> Start by
On Fri, 27 Jul 2018, William Dunlap wrote:
I often use capture.output to slightly reformat printout output. E.g, to
indent str's output to make it easier to read debugging printouts:
debug_print <- function(x, name=substitute(x), indent=4)
{
cat(sep="\n", name, paste0(strrep(" ", indent),
I often use capture.output to slightly reformat printout output. E.g, to
indent str's output to make it easier to read debugging printouts:
debug_print <- function(x, name=substitute(x), indent=4)
{
cat(sep="\n", name, paste0(strrep(" ", indent), capture.output(str(x
}
Used as in
> myData
On Fri, 27 Jul 2018, MacQueen, Don wrote:
Given your description, I would start with
sink('wysumallyrs.txt')
print( summary(wyallyrs) )
sink()
and see if that doesn't meet your needs.
Don,
I started with sink() trying to follow
You can readily do it yourself:
x <- 56
length(x) # hint: why do you expect length(56) to be 2?
rnorm(length(x))
x + rnorm(length(x))
For more complicated problems, the debugger is useful, but I almost always find
investigating the steps at the command line to be the most informative.
Sarah
On
Given your description, I would start with
sink('wysumallyrs.txt')
print( summary(wyallyrs) )
sink()
and see if that doesn't meet your needs.
Some of the basic principles:
(1) Whenever you type the name of an R object at the R prompt, it is as if R
wraps whatever you typed inside print().
Debugging in R applies one statement at a time. If you want to debug within a
statement you can "step into" the function calls within the statement or you
can execute the function calls separately and inspect the result. Your function
consists of one statement so the debugger only has one place
Dear Ibrauheem
First try
length(56)
then try
rnorm()
using the value you got in stage 1
Michael
On 27/07/2018 16:07, إبراهيم خطاب Ibrauheem Khat'taub wrote:
Hi everyone,
I am taking my first R course. This was my first example.
When I executed:
AddLengthNoise <- function(x) {x +
On Fri, 27 Jul 2018, Bert Gunter wrote:
print.summaryDefault ## at the prompt. It's in base R, so no package::
prefix needed will give you the code used for formatting. You can then do
the same.
Bert,
Thank you.
Rich
__
R-help@r-project.org
Not quite sure what you mean here.
R is open source, so
> print.summaryDefault ## at the prompt. It's in base R, so no package::
prefix needed
will give you the code used for formatting. You can then do the same.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that
Try
cat(sep="\n", file=con, capture.output(summary(...)))
capture.output(x) return character vector whose elements contain
the lines of text that would have been printed by print(x).
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Jul 27, 2018 at 8:20 AM, Rich Shepard
wrote:
> I want
On Fri, 27 Jul 2018, William Dunlap wrote:
Try
cat(sep="\n", file=con, capture.output(summary(...)))
capture.output(x) return character vector whose elements contain
the lines of text that would have been printed by print(x).
Bill,
Thanks very much. I doubt my searches would have found
Hi everyone,
I am taking my first R course. This was my first example.
When I executed:
AddLengthNoise <- function(x) {x + rnorm(length(x))}
using 56 as the value of x, I expected the result to be two values,
something like:
[1] 56.17491697 56.02935105
because I expected rnorm to return two
I want to save the output of summary(df_name) to a disk file and my
research found that the sink() function is what I want to use. The 'R Cookbook'
provides a an alternative example using cat() to a connection. Here,
con <- file("wysumallyrs.txt", "w")
cat(summary(wyallyrs), file=con)
> Duncan Murdoch
> on Thu, 28 Jun 2018 20:57:19 -0400 writes:
> On 28/06/2018 5:29 PM, Jeff Reichman wrote:
>> R-Help
>>
>>
>>
>> Is there a way to make a rectangle transparent (alpha=0.1??)
>>
>>
>>
>> plot(c(100, 200), c(300, 450),
If Sys.which("grep") says that grep is available then system("grep -n ...")
will do it.
> cat(c("One","Two","Three","Four"),sep="\n",file=tf<-tempfile())
> system(paste("grep --line-number", shQuote("^T"), shQuote(tf)),
intern=TRUE)
[1] "2:Two" "3:Three"
> as.integer(sub(":.*$", "",
On Fri, 27 Jul 2018, Eric Berger wrote:
I also use emacs with ESS for editing R files and I have been living with
the comment indentation problem you described. Based on the comments in
this thread I did a search and found a posted solution that works for me.
See
Er, rbind is not merge... do.call expects the function you specify to handle
all the elements of the list in a single invocation... Reduce will work with a
two-argument function.
Reduce(merge, df.list, accumulate=TRUE, by='date')
For clarity: apply and the like have for loops inside them, so
Dear Bert,
Thanks for your answer, I already wrote to the maintainer/author of
samplesize, Ralph Scherer, on Thu, Apr 19, 2018 but still have no
answer.
Does anyone have any ideas? Thank you.
John.
On 26 July 2018 at 20:18, Bert Gunter wrote:
> Suggest you contact the package maintainer.
>
>
Short answer: do.call()
do.call("rbind", df.list)
will rbind all of the data frames in df.list.
You may have to tidy up row names afterwards, and you will need to make sure
that the data frames all have the same column names and each column has the
same class, or you'll get unexpected results.
Hola,
Aquí dan detalles de cómo hacerlo.
https://stackoverflow.com/questions/4332274/how-can-a-line-be-overlaid-on-a-bar-plot-using-ggplot2
Saludos,
Carlos Ortega
www.qualityexcellence.es
El 27 de julio de 2018, 13:13, Jaume Tormo escribió:
> Yo hice una vea un gráfico parecido, sin ggplot,
Yo hice una vea un gráfico parecido, sin ggplot, el gráfico está aquí:
https://acercad.wordpress.com/2009/05/05/acerca-de-otra-grafica-en-r/
Jaume.
El lunes, 23 de julio de 2018, Dayana Muñoz
escribió:
> Estimad@s,
>
> Junto con saludar, quería saber si alguien me podría ayudar con este
>
Hello,
If you need to go through R the function fread of data.table
can speed up the data import.
If not and you work on a gnu/linux distro may be awk might help
https://stackoverflow.com/questions/5536018/how-to-print-matched-regex-pattern-using-awk
HTH,
Jeremie
Hi
Did you consider strucchange or segmented packages? They accept restriction on
number of segments.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Tanush Jagdish
> Sent: Friday, July 27, 2018 12:30 AM
> To: r-help@r-project.org
> Subject: [R] How to limit an isotonic
I am trying to fit an isotonic step function to my data. Every isotonic
step regression function (I've tried isoreg, pava, etc) 'finds' multiple
points of increase (steps) across my dataset. However, I would like to
limit the steps to 7, because given my understanding of the data, I expect
exactly
Hi there,
I have a large/huge text file. I need to locate a line in the file with
a specific string, for example, "Data Points". Now, I use the following
code to do:
df <- readLines(file)
l <- grep("Data Points", df)
However, in this case, the file will be read throughout into R. When the
Hi Rich,
Thanks for posting this question.
I also use emacs with ESS for editing R files and I have been living with
the comment indentation problem you described.
Based on the comments in this thread I did a search and found a posted
solution that works for me. See
Hi
Or maybe without ifelse
xy$w <- with(xy, x * ((y != "A") + 2) * 5)
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Dénes Tóth
> Sent: Thursday, July 26, 2018 10:10 PM
> To: JEFFERY REICHMAN ; r-help@r-project.org
> Subject: Re: [R] Creatng new variable based upon
36 matches
Mail list logo