And to expand a bit: only the site file tries to put objects into the
base package. The local .Rprofile file would put them into the global
environment. So there's still support for .First and .Last, but it has
changed.
This abuses things a bit, but appears to work in an Rprofile.site file:
According to the News file for 4.1.0 -- you should always check there first
for such things --
"The base environment and its namespace are now locked (so one can no
longer add bindings to these or remove from these)."
So the docs do seem to need updating.
Bert Gunter
"The trouble with having an
Here's my relevant OS / version info for background:
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Here's the problem: I've inserted the following lines *only *into my
Rprofile.site file in the etc folder:
if(interactive()){
.Last
Dear All,
I posted this query on stack overflow but I received no replies so I am
posting it here so that someone here can take a look at this.
My query is that suppose the variable I am faceting by has 40 categories
and I want 3 categories per page( 1 row x 3 columns),then the last category
fill
According to the docs:
getSheets() returns a list of java object references each pointing to an
worksheet.
...and the Examples section of the help page shows you how to work with that.
Can't tell whether the methods cover what you need though.
B.
On Apr 17, 2016, at 5:36 PM, Val wrote:
Does
length(getSheets(loadWorkbook("las.xlsx"))
give you the index you need? (Untested).
B.
On Apr 17, 2016, at 9:43 AM, Val wrote:
> Hi all,
>
> I am trying to read data from a particular excel sheet.
>
> library(xlsx)
> dat1=read.xlsx("las.xlsx", sheetIndex = 5)
>
> I know that thi
Hi all,
I am trying to read data from a particular excel sheet.
library(xlsx)
dat1=read.xlsx("las.xlsx", sheetIndex = 5)
I know that this is sheet is the last one and this number grows over time
When I run my script to read the last sheet then I have to change this
number every time manually.
Thanks a lot Ivan and Henrik.
Maram
Sent from my iPhone
> On Oct 14, 2015, at 3:30 PM, Henrik Bengtsson
> wrote:
>
> In addition,
>
> if you go to https://stat.ethz.ch/mailman/listinfo/r-help (which is in
> the footer of every R-help message), you'll find a link to 'R-help
> Archives' (http
In addition,
if you go to https://stat.ethz.ch/mailman/listinfo/r-help (which is in
the footer of every R-help message), you'll find a link to 'R-help
Archives' (https://stat.ethz.ch/pipermail/r-help/). On that latter
page, you'll see all messages that have been sent out to the list.
That will al
Maram,
I have received both of your e-mails on this topic, so they made it to
the list.
There is the option " Receive your own posts to the list?" on the
membership configuration website
(https://stat.ethz.ch/mailman/options/r-help/). If it is checked to
"no", that would explain why you didn'
Dear All,
My last mail entitled: "using the apply() family to evaluate nested functions
with common arguments" to the r-help list didn't reach me though I've sent it 2
days ago. I've included my suggested code and asked about some details to make
it work. In addition, I haven't received any fee
Dear all,
We are filling some positions to work with statistics (and a lot of R) in
greater Porto Alegre Area (RS), in Brazil. If you are interested please see
more details here:
https://www.facebook.com/photo.php?fbid=10152750369209601&set=a.10151426344089601.1073741828.518839600&type=1
, here:
h
Hi,
Try this:
ans<-function(){.Last.value}
2+3
[1] 5
ans()
[1] 5
A.K.
- Original Message -
From: darnold
To: r-help@r-project.org
Cc:
Sent: Friday, July 20, 2012 1:12 AM
Subject: [R] Last answer
Hi,
In Matlab, I can access the last computation as follows:
>>
All,
Thanks. That works.
D.
--
View this message in context:
http://r.789695.n4.nabble.com/Last-answer-tp4637151p4637157.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
Is that what you mean:
> 2 + 3
[1] 5
> .Last.value
[1] 5
Rgds,
Rainer
(from R-intro.pdf, page 7, 2nd footnote)
Original-Nachricht
> Datum: Thu, 19 Jul 2012 22:12:22 -0700 (PDT)
> Von: darnold
> An: r-help@r-project.org
> Betreff: [R] Last answer
> Hi,
My apologies. I stand corrected. Thanks Michael.
Josh
On Thu, Jul 19, 2012 at 10:29 PM, R. Michael Weylandt
wrote:
> See: https://stat.ethz.ch/pipermail/r-help/2012-February/303110.html
>
> Michael
>
> On Fri, Jul 20, 2012 at 12:19 AM, Joshua Wiley wrote:
>> Hi David,
>>
>> No, but you can st
See: https://stat.ethz.ch/pipermail/r-help/2012-February/303110.html
Michael
On Fri, Jul 20, 2012 at 12:19 AM, Joshua Wiley wrote:
> Hi David,
>
> No, but you can store the results and access that.
>
> ## parentheses to force printing
> (x <- 2 + 3)
>
> x
>
> Cheers,
>
> Josh
>
>
> On Thu, Jul 1
Hi David,
No, but you can store the results and access that.
## parentheses to force printing
(x <- 2 + 3)
x
Cheers,
Josh
On Thu, Jul 19, 2012 at 10:12 PM, darnold wrote:
> Hi,
>
> In Matlab, I can access the last computation as follows:
>
>>> 2+3
>
> ans =
>
> 5
>
>>> ans
>
> ans =
>
Hi,
In Matlab, I can access the last computation as follows:
>> 2+3
ans =
5
>> ans
ans =
5
Anything similar in R?
David
--
View this message in context:
http://r.789695.n4.nabble.com/Last-answer-tp4637151.html
Sent from the R help mailing list archive at Nabble.com.
? duplicated
!duplicated(a.ord, fromLast = TRUE)
HTH,
Michael
On Tue, May 15, 2012 at 9:37 PM, Axel Urbiz wrote:
> Dear List,
>
> How can I get a logical vector as shown by a.ord.last below (i.e., it is
> FALSE whenever there are subsequent equal values of an ordered vector and
> FALSE otherwi
Dear List,
How can I get a logical vector as shown by a.ord.last below (i.e., it is
FALSE whenever there are subsequent equal values of an ordered vector and
FALSE otherwise)?
a <- c(1,1,2,1,3,4,3,5,6)
a.ord <- a[order(a)]
a.ord
a.ord.last <- c(F, F, T, T, F, T, T, T, T)
Thanks for any help
On Fri, Sep 30, 2011 at 5:43 AM, Jan Wijffels wrote:
> Hi R-helpers
>
> I'm looking for a vectorised function which does missing value replacement
> as in last observation carried forward in the zoo package but instead of a
> locf, I would like the locf function to add +1 to each time a missing va
Hi R-helpers
I'm looking for a vectorised function which does missing value replacement
as in last observation carried forward in the zoo package but instead of a
locf, I would like the locf function to add +1 to each time a missing value
occurred. See below for an example.
> require(zoo)
> x <-
Sorry everybody, temporary dyslexia.
Sent from my BlackBerry wireless smartphone
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
Or this;
remember <- function(expr, value, ok, visible) {
assign( ".Last.expr", expr, .GlobalEnv )
invisible( TRUE )
}
addTaskCallback(remember)
> x <- rnorm(
+ 10 )
> .Last.expr
x <- rnorm(10)
Romain
On 08/02/2009 01:11 PM, Gabor Grothendieck wrote:
Try this:
x<- 4
x*x+3
[1] 19
save
Try this:
> x <- 4
> x*x+3
[1] 19
> savehistory(".Rhistory")
> c(parse(text = tail(readLines(".Rhistory"), 2)[1]))
expression(x * x + 3)
On Sun, Aug 2, 2009 at 5:02 AM, Daniel Haase wrote:
> Hi,
>
> I am looking for a way to find out the last expression that was entered by
> the user, similar to
Hi,
I am looking for a way to find out the last expression that was
entered by the user, similar to ".Last.value", but for the unevaluated
expression instead of the evaluated one.
Example:
x <- 4
x*x + 3
[1] 19
.Last.value # that's the evaluated last expression
[1] 19
# but I am looking
Hi David,
I think the revolution blog is fantastic and a great service to the R
community. Thanks for all your hard work!
Hadley
On Fri, May 1, 2009 at 4:54 PM, David M Smith
wrote:
> I write about R every weekday at http://blog.revolution-computing.com
> . In case you missed them, here are so
I write about R every weekday at http://blog.revolution-computing.com
. In case you missed them, here are some articles from the month of
April of particular interest to r-help subscribers. Thanks to everyone
who has been following the blog and sending me messages and/or leaving
comments -- it alwa
I write about R every weekday at http://blog.revolution-computing.com
. In case you missed them, here are some articles from the past month
that may be of particular interest to r-help:
* http://tinyurl.com/cz3jmk REvolution Computing is hiring! We are
looking for enthusiastic and talented people
Dear Gabor,
Thank you very much for this very helpful suggestion. Indeed, I was
making it too complicated by spliting the string into a vector.
Thank you!
/Fredrik
On Wed, Mar 18, 2009 at 3:37 PM, Gabor Grothendieck
wrote:
> Try this:
>
>> L <- c("!H*L", "L%", "%L", "H*L", "L%", "%L", "H*L", "
Try this:
> L <- c("!H*L", "L%", "%L", "H*L", "L%", "%L", "H*L", "H*L", "L%",
+ "%L", "H*L", "!H*L", "L%", "%L", "%L", "%L", "%L", "H*L", "!H*L",
+ "L%", "H*", "%L", "H*L", "L_%", "%L", "%H", "%H", "!H*L", "%H",
+ "H*", "%H", "%H", "H%", "H*", "!H*L", "H*L", "!H*L", "H*", "H*L",
+ "L_%", "%L", "%L
Dear list,
This seems like a very simple problem, but I am failing to loose a
dimension (I think).
I have list, like this:
...
[2072] "!H*L" "L%" "%L" "H*L" "L%" "%L" "H*L" "H*L" "L%"
"%L" "H*L" "!H*L" "L%" "%L" "%L" "%L" "%L" "H*L" "!H*L"
[2091] "L%" "H*" "%L" "H*L
Barry Rowlingson wrote:
> 2009/1/23 Jorge Ivan Velez :
>
>> See ?.Last.value
Or put this inside your Rprofile:
makeActiveBinding("prev", function(...) .Last.value, .GlobalEnv)
I like this 'cause I don't need to include the "()" for prev to work
properly.
Thanks!!! Best R list ever...
Cheers,
Nick
Barry Rowlingson wrote:
2009/1/23 Jorge Ivan Velez :
See ?.Last.value
But don't do that right after you've done the calculation! You get
*one* chance with .Last.value:
# here comes my important numbers...
> runif(10)
[1] 0.7685472 0.2301233
2009/1/23 Jorge Ivan Velez :
> See ?.Last.value
But don't do that right after you've done the calculation! You get
*one* chance with .Last.value:
# here comes my important numbers...
> runif(10)
[1] 0.7685472 0.2301233 0.3053993 0.5185696 0.3345997 0.1544350 0.2663696
[8] 0.3507546 0.5784
Yikes!
Try .Last.value
Sarah
On Fri, Jan 23, 2009 at 5:02 PM, Nick Matzke wrote:
> Hi,
>
> Let's say one has just run a command line command that took an hour and
> produced a huge matrix as an output. However, one forgot to store the
> output in a variable.
>
> Is there a hidden variable some
Dear Nick,
See ?.Last.value
HTH,
Jorge
On Fri, Jan 23, 2009 at 5:02 PM, Nick Matzke wrote:
> Hi,
>
> Let's say one has just run a command line command that took an hour and
> produced a huge matrix as an output. However, one forgot to store the
> output in a variable.
>
> Is there a hidden
Hi,
Let's say one has just run a command line command that took an hour and
produced a huge matrix as an output. However, one forgot to store the
output in a variable.
Is there a hidden variable somewhere that stores the result, so that one
doesn't have to re-run the analysis for an hour?
This evening I ran into the problem Chuck Clifton referred to in message 86
of Volume 71 Issue 9 of this list. That is, objects created by lmer change
after calling pvals.fnc on that lmer object when using lme4
version 0.999375-16 and 0.999375-28. This is somewhat troublesome. The bug
tracker on
Dear R-help list,
for a package that uses Rmpi calls and a namespace,
I need to define a .Last() function to call mpi.finalize() - directly
before R quits.
The hooks like on .onUnload are not useful in this case, because they
are not executed when the R session is finished.
The defined .L
41 matches
Mail list logo