Displaying 5 results from an estimated 5 matches for "myg".
Did you mean:
msg
2011 Feb 22
1
Discrepancies in run times
Dear R-users,
I am in the process of creating new custom functions and am quite puzzled by
some discrepancies in execution time when I run some R scripts that call
those new functions. So here is the situation:
- let's assume I have created two custom functions, called myg and myf;
- myg is mostly a plotting function, which makes a heavy use of grid and
lattice functions;
- myf is a function that massages data, opens and closes graph devices, and
pass the data to myg:
* myf contains loops and sub-loops which subset the data in little pieces
necessary for plotting p...
2024 Jan 11
4
arrow on contour line
...ral point of the contour line)? Any direction will do, but perhaps the
direction of the gradient will be the best.
Thanks in advance.
DB
--------------------------------------------
library(tidyverse)
x <- seq(1,2,length.out=100)
y <- seq(1,2,length.out=100)
myf <- function(x,y) {x*y}
myg <- function(x,y) {x^2 + y^2}
d1 <- expand.grid(X1 = x, X2 = y) %>%
mutate(Z = myf(X1,X2)) %>%
as.data.frame()
d2 <- expand.grid(X1 = x, X2 = y) %>%
mutate(Z = myg(X1,X2)) %>%
as.data.frame()
ggplot(data = d1, aes(x=X1,y=X2,z=Z))+
stat_contour(breaks = c(2)) +
sta...
2004 Oct 22
4
Evaluate a function for various value of parameters
...ion f for different values of parameters. For instance, if
f=function(a,b) a*b
evaluatemyfunction(f,1:10,5) would return:
5
10
15...
I would like that f could have a variable number of arguments. I have begin
to write a function:
evaluatemyfunction=function(f,...){
b=match.call(expand.dot=F)$...
myg=expand.grid(lapply(b,eval)) #contains all combinations of parameters
for (i in 1:nrow(myg)){
argsasname=paste(paste(names(myg),myg[1,],sep="="),collapse=",")
# ??????
}
}
I have try to construct arguments of the function as character, then parse
and pass it to f but parse do...
2004 Apr 14
3
A bug report?
Folks,
I have a strange situation, which I may have isolated as a bug
report. Or, it could just be that there's something about R that I
don't know. :-) I have attached the data file and the program file but
don't know whether these attachments will make it into the list. Here
is my bugreport.R program --
---------------------------------------------------------------------------
2009 Jul 23
1
[PATCH server] changes required for fedora rawhide inclusion.
...0&Umx?$;d;=#Gc<yj^<U9zE{~J#U{bnu`7BIK*- at btQj3$v?~TUt;+$v;0?B{;Mqi
zHI}bBR&v3VOY*;k1ami$d?BiQA*5V)zK~A-M*<zjXmhX6e_hM{UA`Dzz8GHqBQ*ao
z%~@l}Do)V+?*wtQp4&Blx}HB%&!4MbMjV6^mFOf-*esHoo|~hOBn at N~X)>COA!Ern
zGM-Ez6Uii!HieL>WEvTnKb<7!rCvs6ki3~><fXF`=%khLJDto%g(EMYgS7Li97^Vr
zd1U03^N}?Ev49YYRHuc4*&x?B{|SbXi@@>6#e(6_#C`J;vXqQmCQ6ec=dC%*$;jdr
zg1yMqD~C95TS-7!C7UyDC#z+B{nki!cga8$y<@G}mlAR(Nio(FGV;z1WFzrx5+(jk
zM&2umlx-HN|D==DEo5ZneMmUc$;e5hYRFcUHsce?J^pQkq#rRjQ904Ls&m3P;hZ?Q
z=H$f1X$n_UxthkcbgpJ_J&WtvoaJyemy<lMHRZe+C(Su+!AVQ*DBzAuxzUO{T66...