search for: mypar

Displaying 8 results from an estimated 8 matches for "mypar".

2006 Sep 22
4
Creating Movies with R
...he things specific for the dynamics along x lam1<- -beta/2*(1+sqrt(1+4*St)) lam2<- -beta/2*(1-sqrt(1+4*St)) xmin<- -0.5 xmax<-0.5 x0<-0.1 vx0<-x0 nx<-101 ## grid intervals along x newx<-seq(xmin,xmax,len=nx) # grid along x # M1 <- do.call("g", c(list(x = newx), mypar)) mypar<-c(q,lam1,lam2) sig_xx<-do.call("sigma_pos",c(list(t=newtime),mypar)) mypar<-c(lam1,lam2,x0,vx0) exp_x<-do.call("expect_position",c(list(t=newtime),mypar)) #rho_x<-function(x,expect_position,sigma_pos) #NB: at t=0, the density blows up, since I have a...
2014 Nov 28
1
Feature request: mixing `...` (three dots) with other formal arguments in S4 methods
...` in order encapsulate shiny-specific graphical parameters in a own function (sorry, I couldn't come up with a better example just now). I'm using a simplified example where `cex` is indeed a formal parameter (which is not the case in the actual `par()`): myPlot <- function(x, ...) { myPar(...) } myPar <- function (cex = 1.0, shiny = FALSE, ...) { if (!shiny) { message("myPar/cex:") print(cex) } else { parShiny(...) } } parShiny <- function (cex = 1.0) { message("parShiny/cex:") print(cex) } > myPlot(x = 10, cex = 1.25) myPar/cex: [1...
2006 Oct 03
1
do.call with Vectorial Argument
...same function where the only argument t is given as a 1x1 vector sigma_pos<-function(myargs) { q/(lam1-lam2)^2*( (exp(2*lam1*myargs[1])-1)/(2*lam1)-2/(lam1+lam2)*(exp(lam1*myargs[1]+lam2*myargs[1])-1) + (exp(2*lam2*myargs[1])-1)/(2*lam2) ) } # Now I use do.call newtime<-seq(1,5,len=1001) mypar<-c(q,lam1,lam2) sig_xx<-do.call("sigma_pos_old",c(list(t=newtime),mypar)) # Now this line does not work; sig_xx2 is not a vector equal to sig_xx sig_xx2<-do.call("sigma_pos",c(list(myargs =newtime))) So I am making some mistake with the do.call command, since I ge...
2002 Mar 13
1
controlling figure dimension/location
...hodically reduce the space while maintaining the same figure dimensions for both plots. I could add margin space below the lower plot and reduce space above the lower plot but that leaves a bunch of whitespace at the bottom of the figure. What command am I missing? thanks, Mike Example commands: mypar <- par(no.readonly=T) par(mfcol=c(2,1)) par(mar=c(5,4,1,1)) plot(rnorm(100), ylim=c(-3,3), xlab="", axes=F) axis(1, at=seq(0,100,20), labels=c("","","","","","")) axis(2, at=seq(-3,3,1)) box() plot(rnorm(100), ylim=c(-3,3), ax...
2008 Oct 17
2
function help
Hi everyone, I have dataset which I make a sample of it couple of times and each time I get the mean and standard deviation of each row for each sample. I have a function for that, which takes the name of the file and number of times to sample and then returns the mean and standard deviation for each row in each sample. Sample=function(name, n){
2014 Nov 27
2
Feature request: mixing `...` (three dots) with other formal arguments in S4 methods
Hi Gabriel, and thanks for answering. I'm basically just trying to find a way to use the power of `...` in more complex scenarios and I'm well aware that this might not be the best approach ;-) Regarding your actual question: "Are you suggesting methods be dispatched based on the *contents* of ... [...]?" Yes, I guess currently I kind of do - but not on the argument *names*
2011 Nov 04
2
Reading parameters from dataframe and loading as objects
Hi List, I want to read several parameters from data frame and load them as object into R session, Is there any package or function in R for this?? Here is example param <-c("clust_num", "minsamp_size", "maxsamp_size", "min_pct", "max_pct") value <-c(15, 20000, 200000, 0.001, .999) data <- data.frame ( cbind(param , value)) data
2007 Jan 05
0
New Feature: External node sources
...first line should be blank). The classes should be on the second line, separated by any amount of whitespace. If there are no classes (i.e., all the code is in the parent node) the second line can be blank or absent. For example, a host''s output would look something like this: myparent webserver dbserver solaris Hopefully this should be one further step towards helping people avoid generating code. As I''ve said before, if you have to generate Puppet code, it''s a bug. This will be in the next release (hopefully out tomorrow). The config parameter'...