Displaying 20 results from an estimated 10000 matches similar to: "To make a graph for 4 functions"
2010 May 30
1
Count the number of consecutive 1's
Hi All,
We have a raw dataset that, on the sampling time column, for example:
t <- c(0,1,2,5,0,5,0,2,5)
And we need to create a second column that indicates the day of the sampling, so the end result of what we want is a vector:
1,1,1,1,2,2,3,3,3
Additional information that might simplify the matter is that, for each day, the time starts with zero and ends with 5.
I am a beginner with R.? So
2005 May 05
3
documenation for arrows() is backwards (PR#7839)
Full_Name: Michael Hoffman
Version: 2.1.0
OS: Linux (Fedora Core 3, kernel 2.6.11-1.14_FC3)
Submission from: (NULL) (193.62.199.8)
help(arrows) says:
"""
arrows(x0, y0, x1, y1, length = 0.25, angle = 30, code = 2,
col = par("fg"), lty = NULL, lwd = par("lwd"), xpd = NULL)
...
If 'code=2' an arrowhead is drawn at
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
Hello dear members of R-help and R-core mailing list,
I am not sure if this request is a "ticket" that should be filled somewhere
outside the mailing list. If so, I apologize for not doing and would like
to know where I should have filled it.
And to the subject matter:
I would like to use a command like this:
plot(c(1,8), 1:2, type="n")
polygon(1:7, c(2,1,2,NA,2,1,2),
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
Hello dear members of R-help and R-core mailing list,
I am not sure if this request is a "ticket" that should be filled somewhere
outside the mailing list. If so, I apologize for not doing and would like
to know where I should have filled it.
And to the subject matter:
I would like to use a command like this:
plot(c(1,8), 1:2, type="n")
polygon(1:7, c(2,1,2,NA,2,1,2),
2012 Oct 02
3
Integration in R
Dear R-users,
I am facing problem with integrating in R a likelihood function which is a
function of four parameters. It's giving me the result at the end but
taking more than half an hour to run. I'm wondering is there any other
efficient way deal with. The following is my code. I am ready to provide
any other description of my function if you need to move forward.
2007 Dec 26
1
Can you recover default argument values of a function?
Hi.
Maybe this is a stupid question. If so, I apologize, but here goes. Suppose I have a function f1(x,...) that calls a function f2(y1,y2,...,yn) in the following way: if x satisfies a certain condition, then I want to call f2(x,y2,...,yn); otherwise I want to use the default value of y1, if there is one. I could do something like the following:
v <- ifelse ( is.null(x), f2( , y2,...,
2009 Jun 19
1
Drawing dendrogram
Dear all,
I would like to draw a dendrogram and mark some parts/branches (by using "segments") including their labels. If I draw it without specifying the length of x axix, I am able to do that (as in My dendrogram 1 of the following codes). However, if I want to specify the x axix, I am not able to draw marking line (by using "segments") including labels (as in My dendrogram
2010 Apr 19
2
nls minimum factor error
Hi,
I have a small dataset that I'm fitting a segmented regression using nls on.
I get a step below minimum factor error, which I presume is because residual
sum of square is still "not small enough" when steps in the parameter space
is already below specified/default value. However, when I look at the trace,
the convergence seems to have been reached. I initially thought I might
2003 May 12
1
plot.ranef.lme (PR#2986)
library(nlme)
data(Phenobarb)
na.include <- function(x)x
phe1 <- nlme(conc~phenoModel(Subject, time, dose, lCl, lV),
data = Phenobarb,
fixed = lCl+lV~1,
random= pdDiag(lCl+lV~1),
start = c(-5,0),
na.action = na.include,
naPattern = ~!is.na(conc))
phe.ranef <- ranef(phe1,augFrame=TRUE)
plot(phe.ranef, form=lCl~Wt+ApgarInd)
[Error in max(length(x0),
2000 Nov 26
5
Another good optimization (for PPC only, though)
Using the PPC frsqrte and fres instructions, I got the percentage time take in the smoothing code in _vp_compute_mask() down from 13.64% to 1.88% of the running time.
In my local copy of Vorbis I have a fast_math.[hc] in vorbis/lib and have a _fast_sqrt() inline in fast_math.h. If anyone else wants to try it out, it follows.
I can currently encode my test file (the first 15 seconds of
2010 Apr 19
3
nls for piecewise linear regression not converging to least square
Hi R experts,
I'm trying to use nls() for a piecewise linear regression with the first
slope constrained to 0. There are 10 data points and when it does converge
the second slope is almost always over estimated for some reason. I have
many sets of these 10-point datasets that I need to do. The following
segment of code is an example, and sorry for the overly precise numbers,
they are just
2009 Oct 02
1
suggest enhancement to segments and arrows to facilitate horizontal and vertical segments
I suggest a simple enhancement to segments() and arrows() to
facilitate drawing horizontal and vertical segments --
set default values for the second x and y arguments equal to the first set.
This is handy, especially when the expressions for coordinates are long.
Compare:
Segments:
< function (x0, y0, x1 = x0, y1 = y0, col = par("fg"), lty = par("lty"),
---
> function
2017 Jun 19
1
arrows: no vectors for "code" and "angle" parameters
I was teaching new R users to make some fun graphs. I had some arrows examples
worked up we came across a problem. The arrows function ignores 2nd
and following elements of vectors given as code an angle.
Would you please consider 1) allowing vectors for code and angle, or
2) returning an error or warning when user mistakenly supplies a
vector for those parameters? When code like this is
2002 Jun 17
3
Error bars.
There was an inquiry on this list recently about plotting some simple
error bars on a graph. Now Splus has a function (error.bar ---
originally written by Sue Clancy of DMS, CSIRO, I believe) to do this
job virtually at the touch of a key. (Well a few keys. :-) ) The
error.bar function is written completely in raw S --- no calls to
``.Internal'' or anything like that. So it would be
2017 Apr 26
2
Store unswitch
Hi,
Yes, I can see why that would not work.
The sinking algorithm in SimplifyCFG isn't particularly clever. In
particular it can't reason about memory ordering and aliasing. In
unswitch1(), it can identify that the stores correlate because the
correlating stores appear in the same relative source order. In unswitch2()
they have been permuted, and the algorithm cannot deal with this. This
2008 Apr 16
1
segments() with zero-length arguments (PR#11192)
Uwe Ligges suggested I post this on R-bugs as a wishlist item with a
proposed patch. R considers zero-length arguments to segments() to be
an error. I would like R to allow this and to return without an
error. It occurs naturally in settings like
valid <- c(FALSE, FALSE, FALSE)
segments(x0[valid], y0[valid], x1[valid], y1[valid])
For what it may be worth, S-Plus does not consider
2017 Apr 26
3
Store unswitch
Thanks,
Looks like inst combine do the job
On Tue, Apr 25, 2017 at 9:36 PM, Davide Italiano <davide at freebsd.org> wrote:
> On Tue, Apr 25, 2017 at 9:24 PM, Hongbin Zheng via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Hi,
> >
> > Is there a pass in LLVM that can optimize:
> >
> > if (x)
> > a[i] = y0;
> > else
> >
2001 Aug 02
1
arrows()/log scale/clipping (?) (PR#1039)
arrows() seems to hang when either x or y scale of the plot
is logarithmic and the arrows requested go beyond the plot
(by more than a certain amount). I didn't go into C code to
find it, but here's a function that exercises the bug a bit ...
arrow.bug2 <- function(y0=1,y1=10,log="y") {
plot(c(0.1,1),c(1,10),log=log)
arrows(x0=0.5,
y0=y0,
x1=0.5,
2012 Jul 17
1
[LLVMdev] Tile64 bundle-types and VLIW infrastructure
Hello,
I've made a backend for Tile64 processor as my master's thesis. Of
course, there is a lot to do in order to harness all the power of the
processor, but LLVM programs already can be compiled to tile assembly.
If anyone interested in the backend, just let me know and I release the
code on our project site.
One way to improve my backend is to utilize its ILP capabilities, so
I'd
2005 May 26
1
fir_mem_up filter question
In the fir_mem_up filter, the inner loop does a mac on the y0, y1, y2,
y3 variables. What is the range of values of those variables? I would
like to move the SHR 1 outside the loop after the mac has been done.
Will this result in a 32 bit overflow of the y0, y2, y2 and y3 variables?
-Fritz
On2 Technologies, Inc.
http://www.on2.com