This is a good site for such searches:
https://rdrr.io/
Searching on "st_point" there says it's in the 'geotidy' package on github.
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
This was a change in tidyr 0.7.0 that is causing a lot of confusion,
so we are preparing tidyr 0.7.1 which will back this change out.
If you want a work around in the meantime, you can express your
operation a bit more elegantly as:
library(tidyr)
df <- data.frame(v1 = 1:5, somestring = 6:10, v3
Or perhaps two exclamation points would be better ('unquote' in the
tidyverse lexicon, 3 bangs is 'unquote-splice').
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Aug 24, 2017 at 10:20 AM, William Dunlap wrote:
> Try putting !!! (three exclamation symbols) in front of which(...)==
>
Looks like a bug to me. I think you need to correspond with the package
(tidyr?) maintainer, perhaps by putting a bug report on GitHub.
Next time please make your example reproducible by including the necessary
"library" function calls.
--
Sent from my phone. Please excuse my brevity.
On Aug
Try putting !!! (three exclamation symbols) in front of which(...)==
The non-standard evaluation in the tidyverse can cause confusion.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Aug 24, 2017 at 4:32 AM, Eugeny Melamud <
eugeny.mela...@lanit-tercom.com> wrote:
> Hi all!
>
> The fol
Inline.
-- Bert
On Thu, Aug 24, 2017 at 4:32 AM, Eugeny Melamud
wrote:
> Hi all!
>
> The following code (executed in console)...
> somevar <- data.frame(v1 = 1:5, somestring = 6:10, v3 = 11:15, v4 =
> 16:20);
> somevar %>% gather(key = var, value = val, which(names(somevar) ==
> "som
Bert:
My question implies that I read (consulted) the reference, as I cited
actual wordings of the reference.
Apparently, you think I am lazy, and dumb, and like to waste R-helpers'
time, as well as mine.
Thanks for your reply, quite helpful.
Bruce
~~
Bert Gunte
Dear David:
Thank you for your excellent reply.
Apparently, you are a in the know.
Again, thanks.
Bruce
__
Bruce Ratner PhD
The Significant Statistician™
(516) 791-3544
Statistical Predictive Analytics -- www.DMSTAT1.com
Machine-Learning Data Mining -- www.GenIQ.net
> On May 11,
> On May 11, 2017, at 6:31 AM, Bruce Ratner PhD wrote:
>
> Bert:
> Not clear to me.
> Where mentioned are the functions similar to glm, if you please?
The basis for the similarity was stated as having an available link function
(and I suspected, an inverse as well.) I, for one, wouldn't have
Bert:
Not clear to me.
Where mentioned are the functions similar to glm, if you please?
Bruce
__
> On May 11, 2017, at 8:39 AM, Bert Gunter wrote:
>
> ?glmulti seems clear enough to me. If not, pls check the reference given
> therein.
>
> Bert
>
>> On May 11, 2017 5:22 AM, "B
?glmulti seems clear enough to me. If not, pls check the reference given
therein.
Bert
On May 11, 2017 5:22 AM, "BR_email" wrote:
> Thanks, Bert. I would expect the list to include, at least lm. The
> reference states, "See Examples section."
> But, there is nothing in that section or elsewhere
Thanks, Bert. I would expect the list to include, at least lm. The
reference states, "See Examples section."
But, there is nothing in that section or elsewhere!!
Bruce
Bert Gunter wrote:
Probably? :
All functions for which a link function of the response is modeled as
a linear predictor of th
PLEASE REMOVE THIS MESSAGE AND PREVIOUS COPIES ! - Many thanks
Dear All,
In the following simple case I can't seem to get an improved fit,
despite trying all of the control possibilities. As there seem to be
no examples anywhere which show use of functions such as "dnorm"
within a formula, and a
Dear All,
In the following simple case I can't seem to get an improved fit,
despite trying all of the control possibilities. As there seem to be
no examples anywhere which show use of functions such as "dnorm"
within a formula, and as I am not confident at all that my formula is
correctly configur
r:
>
> Begin forwarded message:
>
> > From: David Winsemius
> > Subject: Re: [R] functions and matrices
> > Date: July 1, 2013 6:21:09 PM PDT
> > To: Rolf Turner
> >
> >
> > On Jul 1, 2013, at 5:09 PM, Rolf Turner wrote:
> >
> >> On
On Jul 1, 2013, at 3:32 PM, Rolf Turner wrote:
>
> Basically R does things *numerically* and what you want to do really
> amounts to symbolic manipulation. Of course R could be cajoled into
> doing it --- see fortune("Yoda") --- but probably only with a great deal of
> effort and code-writing.
Basically R does things *numerically* and what you want to do really
amounts to symbolic manipulation. Of course R could be cajoled into
doing it --- see fortune("Yoda") --- but probably only with a great deal of
effort and code-writing.
OTOH you could quite easily write a function that would c
A function looks up free variables in the environment in which the function
was defined, not in the environment in which the function was called. The
latter is called something like 'dynamic scoping' and usually leads to trouble,
the former is 'lexical scoping' and leads to predictable results. Y
Hello,
See the help page for parent.frame, and use its argument to go back to
the frames of variables 'a' and 'b':
innerfunction<-function()
{
env1 <- parent.frame(1) # for 'b'
env2 <- parent.frame(2) # for 'a'
print(paste(env2$a, " from inner function"))
print(paste(env1$b,
On 10.05.2013 08:19, Sachinthaka Abeywardana wrote:
Hi all,
Would be great if you could help me get my head around the "further
arguemnts" in the optim function. Let's say we have f and g as shown:
f<-function(x,a,b){(x-a)^2+b}
optim(100,fn=f,gr=NULL,2,5) #the NULL is annoying
g<-function(x
Dear Duncan, dear Rui,
thanks for your replies. You are correct regarding the additional
paranthesis. I probably copied the wrong code. I, however, get this
inlinedocs error with the correct version. After contacting the package
maintainer I think this is now added to inlinedocs list of bugs.
Hello,
Sorry, it's RIGHT parenthesis.
Rui Barradas
Em 24-01-2013 18:54, Rui Barradas escreveu:
Hello,
Your function declaration has a syntax error, one left parenthesis too
much. Corrected it would be
dummyfunction <- function(filters = function(x) {b = 0; x > b} ){
# rest of code here
Hello,
Your function declaration has a syntax error, one left parenthesis too
much. Corrected it would be
dummyfunction <- function(filters = function(x) {b = 0; x > b} ){
# rest of code here
filters # this returns a function, don't need return()
}
x <- -5:5
f <- dummyfunction() # this
On 24/01/2013 1:32 PM, Jannis wrote:
Dear R community,
I have a problem when I use functions as default values for argumnents
in other functions. When I use curly brackets { here, I can not create a
package with inlinedocs. It will give me the error when using
package.skeleton() in my package st
On 14.07.2012 00:41, Julien Salanie wrote:
I have a read a lot about the benefits of vectorization in R. I have a
program that takes "almost forever" to run. A good way to see if I have
learned something ... My problem can be summarized like this : I have a
nonlinear function of several variables
Hi:
Here's one approach:
a=matrix(1:50,nrow=10)
a2=floor(jitter(a,amount=50))
# Write a function to combine the columns of interest
# into a data frame and fit a linear model
regfn <- function(k) {
rdf <- data.frame(x = a[k, ], y = a2[k, ])
lm(y ~ x, data = rdf)
}
# Use lapply() to
The apply function also works with multi-dimensional arrays, I think
this is what you want to achieve using a 3d array:
aaa <- array(NA, dim = c(2, dim(a)))
aaa[1,,] <- a
aaa[2,,] <- a2
apply(aaa, 3, function(x)lm(x[1,]~x[2,]))
__
R-help@r-project.org m
I hope someone experience with plyr package comes and helps because this
sounds like what it does well, but for your specific example something like
this works:
A = rbind(a,a2)
q = apply(A,2,function(x) {lm(x[1:nrow(a)] ~ x[-(1:nrow(a))])})
but yeah, that's pretty rough so I hope someone can come
Hi:
Try this:
> z <- matrix(rnorm(100), nrow = 10)
> sum(sapply(seq_len(nrow(z)), function(k) det(z[-k, -k])))
[1] 1421.06
where
> sapply(seq_len(nrow(z)), function(k) det(z[-k, -k]))
[1] 432.11613 81.65449 516.95791 54.72775 804.32097 -643.35436
[7] -411.15932 394.18780 84.13173 10
Bill,
Thank you for the correction; yes, Nevilles' is an algorithm to produce the
same Lagrange interpolating polynomial. And thank you for the polynomF
package!
Don Slowik
--
View this message in context:
http://r.789695.n4.nabble.com/functions-for-polynomial-and-rational-interplation-tp359533
Neville's algorithm is not an "improvement" on Lagrange interpolation, it is
simply one way of calculating it that has some useful properties. The result
is still the Lagrange interpolating polynomial, though, with all its flaws.
Implementing Neville's algorithm is fairly easy using the Polynom
Thanks! As noted by an earlier poster, these functions seem to have
been removed from the package. It might be worth contacting the
maintainer to ask if any equivalents are available ...
Cheers
Andrew
On Sat, May 07, 2011 at 09:56:49AM +0200, Arnau Mir wrote:
> El 07/05/11 09:49, Arnau Mir esc
El 07/05/11 09:49, Arnau Mir escribió:
El 06/05/11 01:33, Andrew Robinson escribió:
Hi Arnau,
please send the output of sessionInfo() and the exact commands and
response that you used to install and load apTreeshape.
Sorry, I forgot the commands.
Here they are:
> library(apTreeshape)
Load
El 06/05/11 01:33, Andrew Robinson escribió:
Hi Arnau,
please send the output of sessionInfo() and the exact commands and
response that you used to install and load apTreeshape.
Here It is:
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_
I think those functions are now defunct (were only available in previous
versions).
S
On Thursday, May 5, 2011 at 6:33 PM, Andrew Robinson wrote:
> Hi Arnau,
>
> please send the output of sessionInfo() and the exact commands and
> response that you used to install and load apTreeshape.
>
> Ch
Hi Arnau,
please send the output of sessionInfo() and the exact commands and
response that you used to install and load apTreeshape.
Cheers
Andrew
On Thu, May 05, 2011 at 04:42:58PM +0200, Arnau Mir wrote:
> Hello.
>
> I'm trying to use the functions pandit and treebase. They are in the packag
Thanks for the replies, it wasn't quite what I wanted but it has given me
some more code for working out averages.
I have managed to construct something that nearly works
level.1 level.2 observation
1 1 0.5
1 1
On Wed, 18 Aug 2010, chris20 wrote:
Hi,
I am trying to write a function;
I want to subtract the mean of each class in level 2 from the mean of each
class in level 1 and square the answer, eg.
level.1 level.2 observation
1 1 0.5
1
Hi Chris,
Try ?ave will help you. Anyway, I guess you are computing a statistic.
strs <- " level.1 level.2 observation
1 1 0.5
1 1 0.2
1 2 0.6
1 2 0
On 2010.05.11 18:30:57, Lourdes Molera wrote:
> Hello,
> I need to select a sample from a small population using simple random
> sampling without replacement. I've found two possibilities in R, the
> function sample() and the function S.SI() in the package
> TeachingSampling, but I don't know wh
On Sat, Jan 9, 2010 at 1:21 AM, Werner W. wrote:
> I would like to estimate a quadratic almost ideal demand system in R which is
> estimated usually by nonlinear seemingly unrelated regression. But there is no
> such function in R yet
The "systemfit" package has the function nlsystemfit() for est
Werner,
I know that S-Plus package Finmetrics has a NLSUR function.
This is a commercial package, but maybe if you write the authors asking
for code only, or some hints...
Rick
--
From: "Werner W."
Sent: Friday, January 08, 2010 10:21 PM
To:
Sub
Marc,
Thanks very much for your detailed reply. I'll give your code a try
and post back the time difference.
Cheers,
Whit
On Wed, Jul 8, 2009 at 10:50 AM, Marc Schwartz wrote:
> On Jul 8, 2009, at 8:51 AM, Whit Armstrong wrote:
>
>> I'm running a huge number of regressions in a loop, so I trie
On Jul 8, 2009, at 8:51 AM, Whit Armstrong wrote:
I'm running a huge number of regressions in a loop, so I tried lm.fit
for a speedup. However, I would like to be able to calculate the
t-stats for the coefficients.
Does anyone have some functions for calculating the regression summary
stats of
On Wed, May 20, 2009 at 7:21 AM, Paulo Grahl wrote:
> A <- function(parameters) {
> # calculations w/ parameters returning 'y'
> tmpf <- function(x) { # function of 'y' }
> return(tmpf)
> }
>
> The value of the parameters are stored in an environment local to the
> function. Then I ca
Romain Francois wrote:
Paulo Grahl wrote:
Dear All:
I have a question regarding the behavior of functions.
Say I define a function that returns another function :
A <- function(parameters) {
# calculations w/ parameters returning 'y'
tmpf <- function(x) { # function of 'y' }
retu
On Wed, May 20, 2009 at 7:48 AM, Wacek Kusnierczyk
wrote:
> Paulo Grahl wrote:
>> Dear All:
>>
>> I have a question regarding the behavior of functions.
>> Say I define a function that returns another function :
>> A <- function(parameters) {
>> # calculations w/ parameters returning 'y'
>>
Thanks a lot !
regards,
Paulo Gustavo Grahl, CFA
On Wed, May 20, 2009 at 8:31 AM, Romain Francois
wrote:
> Paulo Grahl wrote:
>>
>> Dear All:
>>
>> I have a question regarding the behavior of functions.
>> Say I define a function that returns another function :
>> A <- function(parameters) {
>>
Paulo Grahl wrote:
> Dear All:
>
> I have a question regarding the behavior of functions.
> Say I define a function that returns another function :
> A <- function(parameters) {
> # calculations w/ parameters returning 'y'
> tmpf <- function(x) { # function of 'y' }
> return(tmpf)
>
> t <- list()
> t[[1]] <- function(b) b*2 ### NOTE, [[ not [
> t
[[1]]
function (b)
b * 2
>
Bill Venables
http://www.cmis.csiro.au/bill.venables/
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Toby
Sent: Tuesday, 21 April 20
Hi,
There seems to be something wrong with your function getinfo.
Try first to substitute your dbGetQuery by a print statement, so that you
can see what is going on:
getinfo=function(t){print(the SQL query)}
allinfo=sapply(c(1985:2007),getinfo)
If these results look good, you can change your fu
On 3/27/2009 11:18 AM, Christos Hatzis wrote:
Hi,
Is there a way to find which functions are flagged for debugging in a given
session?
The isdebugged() function (which is new in 2.9.0) will tell you this.
Duncan Murdoch
__
R-help@r-project.org m
Hi,
you could have a look at the doBy package which makes these operations
easier. Hadley's plyr package is also another option.
baptiste
On 20 Mar 2009, at 01:01, Altaweel, Mark R. wrote:
Hi,
I am trying to perform various functions on a list with a number of
elements. For example. I
On Mar 19, 2009, at 9:01 PM, Altaweel, Mark R. wrote:
Hi,
I am trying to perform various functions on a list with a number of
elements. For example. I would like to take the mean of different
variable values in the entire list. As an example,
say I have a list with 1000 elements and variab
On Sun, 14 Dec 2008, John Fox wrote:
Dear Stas and David,
A couple of people have mentioned linear.hypothesis() in the car package,
which has methods for several kinds of models and a default method that will
work for any model that responds to coef() and vcov(). The delta.method()
function in
ov
> Sent: December-14-08 12:33 AM
> To: r-help@r-project.org
> Subject: Re: [R] Functions in R like lincom and nlcom of Stata
>
> Those commands provide point estimates, standard errors and confidence
> intervals based on linear combination of parameters or
> linearization/delta-
On Sat, 13 Dec 2008, Stas Kolenikov wrote:
Those commands provide point estimates, standard errors and confidence
intervals based on linear combination of parameters or
linearization/delta-method, respectively. R's contrasts appear to be
limited to a single factor and combinations that sum up to
There is function for linear combination in car package as well.
Best
Ronggui
On Sun, Dec 14, 2008 at 1:42 PM, Andrew Robinson
wrote:
>
> estimable in the gmodels package provides point estimates, standard
> errors and confidence intervals for arbitrary linear combinations of
> model parameters.
estimable in the gmodels package provides point estimates, standard
errors and confidence intervals for arbitrary linear combinations of
model parameters. I don't know for non-linear combinations, though.
Cheers
Andrew
On Sat, Dec 13, 2008 at 11:33:12PM -0600, Stas Kolenikov wrote:
> Those com
Those commands provide point estimates, standard errors and confidence
intervals based on linear combination of parameters or
linearization/delta-method, respectively. R's contrasts appear to be
limited to a single factor and combinations that sum up to zero.
I am too so used to this Stata's conce
On Dec 12, 2008, at 11:14 AM, Marc Marí Dell'Olmo wrote:
Hello all,
Does anyone know if there exists any function in R that resembles the
"lincom" and "nlcom" of STATA?. These functions computes point
estimates, standard errors, significance levels, confidence intervals,
etc. for linear and no
On Thu, 24 Jul 2008, Christoph Scherber wrote:
Dear Jon,
The function stepAIC() in Venable´s & Ripley´s MASS library does the job.
Actually, it is extractAIC method in the MASS package that does the job
for stepAIC() or step(), so if you attach MASS then step() should work.
As for 'all.eff
Dear Jon,
The function stepAIC() in Venable´s & Ripley´s MASS library does the job.
Best wishes
Christoph
Jon Zadra schrieb:
Hello,
I make frequent use of the *step()* and, for plotting, *all.effects()
*functions for *lm()* objects. I am now doing more with *lme()* random
effects models,
On Fri, 6 Jun 2008, ZT2008 wrote:
I need to compute a high dimensional integral. Currently I'm using the
function adapt in R package adapt. But this method is kind of slow to me.
I'm wondering if there are other solutions. Thanks.
What does 'high' mean? Numerical quadrature will be slow in mo
Sorry. I mean
a_{i_1i_2\cdots i_m}\approx\sum_{s=1}^p x^1_{i_1s}x^2_{i_2s}\cdots
x^m_{i_ms}
-- J.
On Mar 27, 2008, at 12:57 , Jan de Leeuw wrote:
> I wrote some functions for multiway CANDECOMP, i.e. for least
> squares fitting of
>
> a_{i_1\cdots i_m}\approx\sum_{s=1}^p x^1_{i_1s}x^1_{i_1s}\
c: r-help@r-project.org
> Subject: Re: [R] functions applied to two vectors
>
>
> On 24/10/2007, at 4:15 PM, Anya Okhmatovskaia wrote:
>
> > Hi,
> >
> > I am very new to R, so I apologize if I have missed some
> trivial thing
> > in the manuals/archives.
> a <- c(2, 3, 7, 5)
> b <- c(4, 7, 8, 9)
> mapply(seq, a, b)
[[1]]
[1] 2 3 4
[[2]]
[1] 3 4 5 6 7
[[3]]
[1] 7 8
[[4]]
[1] 5 6 7 8 9
> mapply(sum, a, b)
[1] 6 10 15 14
>
hope this helps,
Tony Plate
Anya Okhmatovskaia wrote:
> Hi,
>
> I am very new to R, so I apologize if I have missed
On 24/10/2007, at 4:15 PM, Anya Okhmatovskaia wrote:
> Hi,
>
> I am very new to R, so I apologize if I have missed some trivial
> thing in
> the manuals/archives. I am trying to get rid of for loops in my
> code and
> replace them with R vector magic (with no success).
>
> Let's say I have 2
68 matches
Mail list logo