similar to: Passing Arguments in a function

Displaying 20 results from an estimated 300 matches similar to: "Passing Arguments in a function"

2011 Feb 11
1
Passing function arguments
Hi All, Im looking for some help passing function arguments and referencing them, I've made a replica, less complicated function to show my problem, and how i've made a work around for this. However i suspect there is a _FAR_ better way of doing this. If i do: BuildDecayModel <- function(x = "this", y = "that", data = model.data) { model <- nls(y ~ SSexp(x,
2012 Jun 20
1
Problem with predict?
Hello, I am trying to fit a model to some "death over time" data that does not fit the criteria for the usual LD50 type models (the counts are too large). I am using a simple linear model in an attempt to plot a nice line on a scatter plot and calculate some LD values to use in designing an experiment. Here is the basic idea of what I'm doing: head(mort) Time Density 0
2006 Nov 27
0
[VoIP Trunk] No such host
Hello I'm trying to add a VoIP trunk to Asterisk, but I'm getting the following warning in the log file if I leave "srvlookup=yes" in sip.conf (OK if I comment it out): -------------- Nov 27 16:40:22 NOTICE[29660] chan_sip.c: -- Registration for '087077XXXX@freephonie.net' timed out, trying again (Attempt #47) Nov 27 16:40:22 WARNING[29660] chan_sip.c: No such
2015 May 25
1
[Bug 90630] New: random driver crashes mostly after screen lock
https://bugs.freedesktop.org/show_bug.cgi?id=90630 Bug ID: 90630 Summary: random driver crashes mostly after screen lock Product: xorg Version: 7.7 (2012.06) Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: major Priority: medium Component: Driver/nouveau
2003 Aug 11
0
Designing and incorporating a digital filter
I have a time series of data from an electroencephalogram (EEG). I wish to filter the data to get rid of 50Hz mains 'hum'. I have 'designed' a combination bandpass and notch filter using a web- site. The site returns the filter in "ANSI C" source code. It is:- /* Digital filter designed by mkfilter/mkshape/gencode A.J. Fisher Command line:
2008 Sep 30
1
Using sub to get captions in barplots
All, I've been using "sub" (subtitle) instead of "main" such that captions are below figures produced by xyplot. This works fine and captions are on a single line. However, when I try this for bar plots with error bars (altering the error.bars function form Crawley's The R Book, see below), the captions are split on more than 1 line. Is there a way to get the
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it. I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2017 Jan 03
0
[PATCH 1/5] builder: extract Yajl helper functions to yajl.ml
Extract the yajl object_get_* helpers in the Yajl module since this could be useful for any Yajl user code. --- builder/simplestreams_parser.ml | 52 -------------------------------------- builder/yajl.ml | 55 +++++++++++++++++++++++++++++++++++++++++ builder/yajl.mli | 29 ++++++++++++++++++++++ 3 files changed, 84 insertions(+), 52 deletions(-) diff --git
2018 Jan 30
2
Calculating angle of a polyline
Assuming your polyline is defined by two vectors, one for the x coordinates, one for the y coordinates, you can try the following library(NISTunits) polyangles <- function(xV,yV) { stopifnot( (length(xV)==length(yV)) && (length(xV) >= 3)) v <- function(i) { c( xV[i]-xV[i-1], yV[i]-yV[i-1])} vlen <- function(v) { sqrt(sum(v*v)) } lV <- rep(NA_real_,length(xV)) for
2009 Mar 11
4
error.bars
Hi, I'm trying to use the function "error.bars", but the program don't find it, and I dont't found any package with this function. Is there some another functin to draw barplots with error bars? Sueli Rodrigues Eng. Agr?noma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutri??o de Plantas Fones (19)93442981 (19)33719762
2018 Jan 30
0
Calculating angle of a polyline
I like to use complex numbers for 2-dimensional geometry. E.g., > polyAngles2 function (xV, yV) { stopifnot((length(xV) == length(yV)) && (length(xV) >= 3)) z <- complex(re = xV, im = yV) c(NA, diff(Arg(diff(z))), NA) # radians, positive is counter-clockwise } > x <- c(0:3) > y <- c(0,0,1,1) > polyAngles2(x,y) / pi * 180 [1] NA 45 -45 NA Bill
2011 Oct 04
1
Rug plot curve reversal
Dear R-help Can anyone tell me why my curve appears the wrong way round on a rug plot? I am using the same code as on pg 596 of the Crawley R-book. mod<-glm(mort~logBd,binomial) par(mfrow=c(2,2)) xv<-seq(0,8,0.01) yv<-predict(mod,list(logBd=xv),type="response") plot(logBd,mort) lines(xv,yv) I've tried swapping xv and yv around but no luck. Thanks, Pete
2018 Aug 20
0
[PATCH 4/4] mltools: JSON: unify JSON_parser type with JSON.json_t.
--- builder/simplestreams_parser.ml | 9 +- .../test-virt-builder-list-simplestreams.sh | 64 ++++++------- builder/utils.mli | 2 +- common/mltools/JSON_parser-c.c | 96 ++++++++++++------- common/mltools/JSON_parser.ml | 29 ++---- common/mltools/JSON_parser.mli | 25 ++---
2018 Aug 22
3
[PATCH v2 0/2] mltools: JSON: unify JSON & JSON parser.
v2: - Added back the null value. - Reran the tests. Rich.
2011 May 26
2
Plot binomial regression line
Dear all, I am quite new with R and I have a problem with plotting a binomial regression line in a plot. This is what I type in: > model<-glm(Para~Size,binomial) > par(mfrow=c(1,1)) > xv<-seq(3.2,4.5,0.01) > yv<-predict(model,list(area=xv),type="response") > plot(Size,Para) > lines(xv,yv) The error message that I get is: > Error in xy.coords(x, y) :
2018 Aug 17
0
[PATCH v3 1/4] mltools: Rename Yajl module as JSON_parser and move to common/mltools.
Commit bd1c5c9f4dcf38458099db8a0bf4659a07ef055d changed all the code to use Jansson instead of yajl. However it didn't change the OCaml API name (which was still Yajl). This commit changes the module to a neutral name ("JSON_parser") and moves it into common/mltools so it can be used by other tools. This leaves us in a slightly awkward situation of having two JSON-ish OCaml
2017 Jun 14
4
[FORGED] Re: draw stripes in a circle in R
On 15/06/17 05:29, David Winsemius wrote: > >> On Jun 14, 2017, at 10:18 AM, David Winsemius <dwinsemius at comcast.net> wrote: >> >> >>> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >>> >>> I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is
2018 Aug 20
6
[PATCH 0/4] mltools: JSON unification
An evolution of: https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
2011 Nov 09
3
Help with tryCatch with a for loop
Hello all, I'm a beginner in R working on a script that will produce a set of models (linear, polynomial and logistic) for each location in a dataset. However, the self-starting logistic model often fails - if this happens I would like to just skip to the next iteration of the loop using tryCatch. I've looked at a few examples and read the help file, but didn't understand tryCatch
2017 Jun 14
0
draw stripes in a circle in R
> On Jun 14, 2017, at 10:18 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >> >> I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is not your question, ask one. >> -- >> Sent from my