Displaying 12 results from an estimated 12 matches for "xappli".
Did you mean:
appli
2008 Nov 12
2
Outer, kronecker, etc.
`outer` (and related functions like kronecker) require that their
functional argument operate elementwise on arrays. This means for
example that
outer( 1:2, 3:4, list)
or
outer(1:2,3:4,function(a,b){1})
gives an error.
Is there a version of `outer`/`kronecker`/etc. that takes arbitrary
functions and does its own elementwise mapping? In the first example
above, I'd expect the
2010 Nov 12
1
Xapply question
Dear list,
I'm stuck with looking for a function of the *apply family, which I suppose
exists already ? just I can't find it:
What I'm looking for is somewhere between sweep and mapply that does a
calculation vectorized over a matrix and a vector:
It should work complementary to sweep: for each row of the matrix, a different
value of the vector should be handed over.
Close to
2023 Aug 10
2
Expresión en un objeto
Hola a todos:
Se me ha planteado un problema que no está ligado a ningún problema
concreto. Es más teórico.
Supongamos que tenemos tres variables:
V1 <- c (47, 71, 41, 23, 83, 152, 82, 8, 160, 18)
V2a <- c (NA, 36, 15, 5, 56, 18, NA, 5, NA, 5)
V2b <- c (37, NA, 15, NA, NA, NA, 90, NA, 161, NA)
Supongamos que tengo la expresión (que no puedo asignarlo a
2023 Aug 11
1
Expresión en un objeto
A ver... con que xfunc() esté preparada para tomar un parámetro de tipo "carácter" y evaluarlo, claro que se puede hacer...
Si el problema lo tienes en evaluar la expresión, la función "eval()" te lo hace.
Si no te he entendido bien, explícate más ?
Saludos
Isidro
-----Mensaje original-----
De: R-help-es <r-help-es-bounces en r-project.org> En nombre de Griera
Enviado
2023 Aug 11
1
Expresión en un objeto
Esta es la respuesta que te da ChatGPT-4:
Entiendo tu pregunta y, aunque no hay una función nativa en R que te
permita hacer exactamente lo que estás pidiendo, puedes lograr el mismo
resultado utilizando una función. Una función te permitiría encapsular la
lógica de la expresión que quieres reutilizar y luego llamar a esa función
donde sea necesario.
He aquí cómo podrías hacerlo:
V1 <-
2023 Aug 11
1
Expresión en un objeto
Muchas gracias, Manuel:
Que bueno! No se me había ocurrido lo de GPT!
Lo pruebo.
Saludos.
On Fri, 11 Aug 2023 18:15:18 +0200
Manuel Mendoza <mmendoza en fulbrightmail.org> wrote:
> Esta es la respuesta que te da ChatGPT-4:
>
> Entiendo tu pregunta y, aunque no hay una función nativa en R que te
> permita hacer exactamente lo que estás pidiendo, puedes lograr el mismo
>
2023 Aug 12
1
Expresión en un objeto
No tuve tiempo de mirarlo, pero, ¿es coherente lo que dice?
El vie, 11 ago 2023 a las 21:02, Griera-yandex (<griera en yandex.com>)
escribió:
> Muchas gracias, Manuel:
>
> Que bueno! No se me había ocurrido lo de GPT!
>
> Lo pruebo.
>
> Saludos.
>
> On Fri, 11 Aug 2023 18:15:18 +0200
> Manuel Mendoza <mmendoza en fulbrightmail.org> wrote:
>
> >
2010 Apr 12
1
how to calculate a table
Hi R-Group,
I am stuck with the following problem: I am constructing a portfolio of
2 variables x and y
x <- rnorm(100, mean=100, sd=4)
y <- rnorm(100, mean=120, sd=10)
which I am combining as follows to a portfolio for sampling purposes:
portfolio <- c(rep(x, 8), rep(y, 2))
In this case I have assigned the weights of 8 and 2 to calculate the
bootstrapped mean:
mean.boot <-
2011 Jan 02
3
The Percentile of a User-Defined pdf
I would like to give a probability distribution function of a function of
(x,y) on the half-plane y>0, and a constant 0<c<1 and I would like to know
the c percentile of the marginal distribution of x. I have tried along
the lines of the following but I keep getting errors:
# SIMPLIFIED PROBLEM
# The plan is to solve for the .975 percentile "xc" of the marginal x
distribution
2011 Mar 30
4
a for loop to lapply
Dear all,
I am trying to learn lapply.
I would like, as a test case, to try the lapply alternative for the
Shadowlist<-array(data=NA,dim=c(dimx,dimy,dimmaps))
for (i in c(1:dimx)){
Shadowlist[,,i]<-i
}
---so I wrote the following---
returni <-function(i,ShadowMatrix) {ShadowMatrix<-i}
lapply(seq(1:dimx),Shadowlist[,,seq(1:dimx)],returni)
So far I do not get same results
2005 Oct 31
1
[R] unvectorized option for outer()
> From: Thomas Lumley
>
> On Sun, 30 Oct 2005, Jonathan Rougier wrote:
>
> > I'm not sure about this. Perhaps I am a dinosaur, but my feeling is
> > that if people are writing functions in R that might be subject to
> > simple operations like outer products, then they ought to be writing
> > vectorised functions!
>
> I would agree. How about an
2010 Feb 25
24
two questions for R beginners
* What were your biggest misconceptions or
stumbling blocks to getting up and running
with R?
* What documents helped you the most in this
initial phase?
I especially want to hear from people who are
lazy and impatient.
Feel free to write to me off-list. Definitely
write off-list if you are just confirming what
has been said on-list.
--
Patrick Burns
pburns at pburns.seanet.com