search for: nint

Displaying 20 results from an estimated 54 matches for "nint".

Did you mean: int
2001 Feb 27
1
Patch to coplot.R
...if ((j == columns || index == nplots) && ((total.rows - ! i)%%2 == 1)) ! axis(4, xpd = NA) box() } if (have.b) { *************** *** 255,274 **** par(fig = c(0, f.col, f.row, 1), mar = nmar, new = TRUE) plot.new() nint <- nrow(a.intervals) ! pwoffs <- nint / 32 ! plot.window(c(min(a.intervals[is.finite(a.intervals)] + pwoffs), ! max(a.intervals[is.finite(a.intervals)]) - pwoffs), ! 0.5 + c(0, nint), log = "") ! rect(a.intervals[, 1]...
2008 May 12
2
Cumulative lattice histograms
An embedded and charset-unspecified text was scrubbed... Name: inte tillg?nglig URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20080512/9533b31f/attachment.pl>
2006 Mar 13
2
Error Message from Variogram.lme Example
...mary works): R : Copyright 2005, The R Foundation for Statistical Computing Version 2.2.1 (2005-12-20 r36812) ISBN 3-900051-07-0 ... > fm1 <- lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat) Error: couldn't find function "lme" > Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE) Error: couldn't find function "Variogram" > library(nlme) > fm1 <- lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat) > Variogram(fm1, form = ~ Time | Rat, nint = 10, robust = TRUE) Error in "$<-.data.frame"(`*tmp*`, "n.pairs&q...
2010 Oct 11
1
MATLAB vrs. R
...I was able to find the area under the trapezoid in MATLAB using the code: function [int] = myquadrature(f,a,b) % user-defined quadrature function % integrate data f from x=a to x=b assuming f is equally spaced over the interval % use type % determine number of data points npts = prod(size(f)); nint = npts -1; %number of intervals if(npts <=1) error('need at least two points to integrate') end; % set the grid spacing if(b <=a) error('something wrong with the interval, b should be greater than a') else dx = b/real(nint); end; npts = prod(size(f)); % trapezoidal rule...
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors... Each of these commands correctly prints "hello": echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit echo -e '#include <iostream>\nint main(){ std::cout << "hello" << std::endl; }' | clang -cc1 -emit-llvm-bc -x c++ | lli Each of these commands results in "LLVM E...
2008 May 15
1
lattice histogram problem with integers values and nint
been puzzling over this for a day. Summary integer variable to use with histogram, 170,000 rows. Value is day of year. Hist works, lattice histogram with nint does not work (spurious spikes in display), lattice histogram using breaks=c(0:365) works fine. Spike values appear to be sum of two adjacent bins. Want to know if this is a familiar problem, and what the recommended work-around is. Also want to know how to get the bin count from the lattice his...
2005 Aug 24
1
histogram method for S4 class.
...s) || outer, outer = FALSE, auto.key = FALSE, aspect = "fill", panel = "panel.histogram", prepanel = NULL, scales = list(), strip = TRUE, groups = NULL, xlab, xlim, ylab, ylim, type = c("percent", "count", "density"), nint = if (is.factor(x)) length(levels(x)) else round(log2(length(x)) + 1), endpoints = extend.limits(range(x[!is.na(x)]), prop = 0.04), breaks = if (is.factor(x)) seq(0.5, length = length(levels(x)) + 1) else do.breaks(endpoints, nint), equal.widths = TRUE, drop.unused.levels =...
2005 Aug 24
1
histogram method for S4 class.
...s) || outer, outer = FALSE, auto.key = FALSE, aspect = "fill", panel = "panel.histogram", prepanel = NULL, scales = list(), strip = TRUE, groups = NULL, xlab, xlim, ylab, ylim, type = c("percent", "count", "density"), nint = if (is.factor(x)) length(levels(x)) else round(log2(length(x)) + 1), endpoints = extend.limits(range(x[!is.na(x)]), prop = 0.04), breaks = if (is.factor(x)) seq(0.5, length = length(levels(x)) + 1) else do.breaks(endpoints, nint), equal.widths = TRUE, drop.unused.levels =...
2002 Apr 01
1
An introduction to R (PR#1426)
(I sent this earlier, but it seems not to have come through, due to problems witkh my system) The following command from appendix A, "a sample session", isnt correct: contour(x, y, fa, nint=15) when used R protests: Warning message: parameter "nint" couldn't be set in high-level plot() function it should probably be nlevels, as used a few lines before. This is R1.4.1 on windows 98. Kjetil Halvorsen -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2011 May 05
7
Draw a nomogram after glm
...fun=list('Prob Y<=1'=plogis), fun.at=c(seq(0,1,by=.1),.95,.99), lmgp=.1, cex.axis=.6) fun.at=c(.01,.05,seq(.1,.9,by=.1),.95,.99), lmgp=.2, cex.axis=.6) options(Fire=NULL) Result is bad and I have this following error message: Erreur dans value.chk(at, i, NA, -nint, Limval, type.range = "full") : variable L does not have limits defined by datadist Could you help me on the code to draw nomogram. Nb: my English is low, I apologize. Thank for your help Komine -- View this message in context: http://r.789695.n4.nabble.com/Draw-a-nomogram-after...
2010 Oct 13
1
Lattice: arbitrary abline in multiple histograms
...ot. The next example will plot a vertical line at x=5.5 in the three plots: rnorm(100,5,3) -> A rnorm(100,7,3) -> B rnorm(100,4,1) -> C rep(c("A","B","C"),each=100) -> grp data.frame(G=grp,D=c(A,B,C)) -> data histogram(~ D | G, data=data, layout=c(3,1), nint=50, panel=function(x,...){ panel.histogram(x,...) panel.abline(v=5.5) }) But I'd like to plot a vertical line at 5.5 in plot A, 6.5 in plot B and 4.5 in plot C. How can I do that? Thanks in advance.. A. [[alternative HTML version deleted]]
2010 Oct 08
1
Trapezoid Rule
...the trapezoid rule to estimate the area under the curve: Here is the code provided: myquadrature = function(f,a,b) { # user-defined quadrature function # integrate data f from x=a to x=b assuming f is equally spaced over the interval # use type # determine number of data points npts = length(f) nint = npts -1 #number of intervals if(npts <=1) error('need at least two points to integrate') end; # set the grid spacing if(b <=a) error('something wrong with the interval, b should be greater than a') else dx = b/real(nint) end; # trapezoidal rule # can code in line,...
2009 Apr 28
2
Dropping 'empty' panels from lattice
I have 8 cofactors possibly affecting one and only one variable. I make conditional histograms: <-pdf(file="tst3.pdf",paper="special",width=36,height=36) <-histogram(~Oversized|dat$c1*dat$c2*dat$c5*dat$c6*dat$c7*dat$c8*dat$c9*dat$c10,nint=21,layout=c(32,8),data=dat,type="count") <-dev.off() This works (compliments to R developers!) but it does generate a large plot with many panels being 'empty', e.g. that combination of factors c1..c10 never occurs in this data set. Is there a way to autmatically drop those e...
2013 Dec 10
4
[LLVMdev] lit: deprecating trailing \ in RUN lines
...t because each frontend has a different take on fundamental issues like where lines and comments begin and end, and even the semantics of what translation phases are vary between compilers. Here's one quick example of how compilers interpret this code differently: |*$* printf '//\\ \nint x=0;\nint x=0;' > f.c||| |||| |||*$* cat f.c||| |||//\ ||| |||int x=0;||| |||int x=0;||| |||| |||*$* clang -fsyntax-only f.c||| |||| |||*$* gcc-4.9 -fsyntax-only f.c||| |||| |||*$* cl f.c||| |||Microsoft (R) C/C++ Optimizing Compiler Version 18...
2003 Nov 04
2
help with nomogram function
...tion 80 right Low 20 both.foam High 80 right Values: time.long$task2 : both.foam left right > The model fitted and then when I try the nomgram function > nomogram(failed.lr2) Error in value.chk(at, i, NA, -nint, Limval, type.range = "full") : variable Age does not have limits defined by datadist > I get an error. The NA values in ddist seem to be the problem but I don't understand the datadist information. Can anyone help explain why this is failing. Thanks Ross Darnell -- Unive...
2006 Nov 14
2
dividing vectors into bins with equal widths
...i R-users, I am trying to divide a vector (say X) into equal frequency bins. If one uses the hist() function, then a histogram is plotted, but with bins of equal widths, and not with bins having the same number of data points. I have then tried the histogram() function as follows: histogram(X, nint=10, breaks=NULL, equal.widths=F) This works as I want. However, I can't extract which points are in which bin, or where the breakpoints are made. Can anybody help? Thanks Daniel -------------------------------------------------------------------- W. Daniel Kissling Institut f?r Zoologie,...
2003 Jan 25
7
Plotting coloured histograms...
Hi, I am having some trouble trying to plot a histogram in more than one colour. What I want to do is, plot two vectors in the same histogram, but with different colours, for instance: > x <- rnorm(1000,20,4); > y <- rnorm(1000,10,2); Then I'd like to have x and y ploted on the same hist (I can do that already doing w <- c(x,y) then hist(w)) but the bars
2017 Aug 15
1
Lattice Histogram Scaling
...d like to think is less silly. >> >> Many thanks, >> Roger >> >> >> require(REBayes) # Source for the velo data >> require(lattice) >> x <- velo >> x <- x[!(x == 0)] >> bandwidths <- (1:4)*10 >> lp <- histogram(~x|bw, nint = 100, border = grey(.9), col = grey(.9), >> type = "density", panel = function(x, bw = bandwidths, ...){ >> panel.histogram(x, ...) >> f <- density(x, bw[packet.number()]) >> panel.lines(f$x, f$y, col = "blue...
2004 Oct 25
1
Multiple formula in one block
Hi Everybody: I want to draw some chart using command "histogram" and add another curve in it. Example: require(stats) data(singer) library(lattice) histogram( ~ height | voice.part, data = singer, nint = 17, endpoints = c(59.5, 76.5), layout = c(2,4), aspect = .5, xlab = "Height (inches)") Now I got a chart of 8 blocks, then I need add :" abline(v=mean(singer$height), col=2, lwd=2) " or any other curve to every block. How can I do to achieve it. Thanks. Best Regards YiY...
2008 Feb 01
1
Cannot save histogram picture when run from script
...ure file is empty when the following statements were run from R script. But the picture file shows up correctly, when the commands are individually run from Rgui. png(file="histogram_correlation.png", bg = "white") require(stats) histogram( ~ height | voice.part, data = singer, nint = 17, endpoints = c(59.5, 76.5), layout = c(2,4), aspect = 1, xlab = "Height (inches)") dev.off() Thanks Daren [[alternative HTML version deleted]]