Displaying 20 results from an estimated 10000 matches similar to: "seq"
2009 Jul 23
2
Bug in seq() (PR#13849)
Full_Name: Jeremiah Cohen
Version: 2.9.0
OS: Windows XP
Submission from: (NULL) (129.59.230.235)
I believe there is a bug in the seq() function for certain values of the "from"
argument. Here are examples:
> seq(-.2, .1, .1)
[1] -0.2 -0.1 0.0 0.1
> seq(-.3, .1, .1)
[1] -3.000000e-01 -2.000000e-01 -1.000000e-01 5.551115e-17 1.000000e-01
> seq(-.4, .1, .1)
[1] -0.4 -0.3
2008 Oct 03
1
Bug or inaccuracy in cumsum( )
I came across this: shouldn't the last value be a more exact zero?
It did not do that with 1 - sum( rep(0.1, 10) )
> 1 - cumsum( rep(0.1, 10) )
[1] 9.000000e-01 8.000000e-01 7.000000e-01 6.000000e-01 5.000000e-01
4.000000e-01 3.000000e-01 2.000000e-01
[9] 1.000000e-01 1.110223e-16
> version
_
platform
2007 Feb 25
1
Writing integers in "write.matrix" function
Hello everyone,
I am using the following program to get the p-value of some numbers
(column 'LR' of the data.dat file). I want to write the 1st and 2nd
column of the output file (data.out) as an integer while the program
change them. Could anybody please tell me how I can write
the code which writes the values of the first two columns as integer?
For your convenience, I have attached the
2008 Apr 24
2
problem with "which"
Hi,
I'm having trouble with the "which" or the "seq" function, I'm not sure.
Here's an example :
> lat=seq(1,2,by=0.1)
> lat
[1] 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0
> which(lat==1)
[1] 1
> which(lat==1.1)
[1] 2
> which(lat==1.2)
[1] 3
> which(lat==1.3)
[1] 4
> which(lat==1.4)
[1] 5
> which(lat==1.5)
[1] 6
>
2004 Oct 14
2
xyplot gets overplotted by plot
Dear all,
After having set par(mfrow = c(2, 2)) and switching between plot() and
xyplot() using R 2.0.0 Patched (2004-10-13) under Windows 2000, the lattice
plot gets overplotted. I also tried this under 1.9.1 Patched (2004-09-22),
since this is the only older version I've got installed, and it did the
same thing apart from that the overplotting now starts in the opposite
lower corner.
2007 Mar 16
3
Unhidden predict methods
Hi,
I've noted that not all `predict' methods are hidden in the namespace:
> methods("predict")
[1] predict.ar* predict.Arima*
[3] predict.arima0* predict.glm
[5] predict.HoltWinters* predict.lm
[7] predict.loess* predict.mlm
[9] predict.nls* predict.poly
[11] predict.ppr* predict.prcomp*
[13]
2003 Jun 19
2
Grouping binary data
Dear all,
I'm analyzing a binary outcome using glm() with a binomial distribution and
a logit link, and have now reached the point where I'd like to do some
model checking. Since my data are in binary form I'd like to collapse over
the cross-classification of the factors before the model checking.
Are there any nice and simple ways doing this? If so, how? If not, I'd be
2017 Feb 07
2
package load altering RNG state
>>>>> Henric Winell <nilsson.henric at gmail.com>
>>>>> on Tue, 7 Feb 2017 13:37:42 +0100 writes:
> Hi, On 2017-02-07 13:12, Benjamin Tyner wrote:
>> Hello
>>
>> When loading a package, I'm wondering if it's frowned
>> upon for the package to alter the state of the random
>> number
2001 Jul 25
1
bug in pretty() (PR#1032)
I have the following output from pretty():
> pretty(c(-.1, 1)) # note 2nd element
[1] -2.000000e-01 -2.775558e-17 2.000000e-01 4.000000e-01 6.000000e-01
[6] 8.000000e-01 1.000000e+00
> as.character(pretty(c(-.1, 1)))
[1] "-0.2" "-2.77555756156289e-17" "0.2"
[4] "0.4" "0.6"
2004 Mar 23
1
influence.measures, cooks.distance, and glm
Dear list,
I've noticed that influence.measures and cooks.distance gives different
results for non-gaussian GLMs. For example, using R-1.9.0 alpha
(2003-03-17) under Windows:
> ## Dobson (1990) Page 93: Randomized Controlled Trial :
> counts <- c(18,17,15,20,10,20,25,13,12)
> outcome <- gl(3,1,9)
> treatment <- gl(3,3)
> glm.D93 <- glm(counts ~ outcome +
2004 Oct 18
3
答复: R plot problems
Thank you for your help!
I gave you an example, you could run it in R . Maybe you will understand my meaning clearly.
x <- data.frame(main.name="AAA", x.name=rep(c("Apply","Watermelon","Lemon","Banana",
2005 May 23
1
How to convert a character string to a number
Hi everyone,
I have a simple problem but don´t know how to solve it.
I read in a table from a text file that looks like that:
-3,932200E-01 -2,000000E-01 4,999995E-02
-3,932099E-01 -1,000000E-01 3,999996E-02
-3,932000E-01 0,000000E+00 3,999996E-02
-3,931899E-01 -1,000000E-01 4,499996E-02
-3,931800E-01 -1,000000E-01 4,499996E-02
-3,931699E-01
2003 Jun 03
3
gam questions
Dear all,
I'm a fairly new R user having two questions regarding gam:
1. The prediction example on p. 38 in the mgcv manual. In order to get
predictions based on the original data set, by leaving out the 'newdata'
argument ("newd" in the example), I get an error message
"Warning message: the condition has length > 1 and only the first element
will be used in: if
2017 Apr 12
3
"table(droplevels(aq)$Month)" in manual page of droplevels
The last line of the example in droplevels' manual page seems to be incorrect to me. I think it should read: "table(droplevels(aq$Month))". Amazingly (I don't understand) both variants seem to produce the same result (R 3.3.3):
---
> aq <- transform(airquality, Month = factor(Month, labels = month.abb[5:9]))
> aq <- subset(aq, Month != "Jul")
>
2006 May 10
1
Allowed quasibinomial links (PR#8851)
Full_Name: Henric Nilsson
Version: 2.3.0 Patched (2006-05-09 r38014)
OS: Windows 2000 SP4
Submission from: (NULL) (83.253.9.137)
When supplying an unavailable link to `quasibinomial', the error message looks
strange. E.g.
> quasibinomial("x")
Error in quasibinomial("x") : 'x' link not available for quasibinomial family,
available links are "logit",
2002 Oct 29
1
pretty not pretty
Hi,
I have a following vector:
> smallch
[1] 0.0652840 0.1181300 0.0319370 0.0155700 0.0464110 0.0107850
[7] 0.0158970 0.0375900 0.0603090 0.0310300 0.0105920 0.0540580
[13] -0.0177740 0.0039393
Pretty (R 1.5.1) has problems with zero:
> pretty(smallch)
[1] -2.000000e-02 -3.469447e-18 2.000000e-02 4.000000e-02 6.000000e-02
[6] 8.000000e-02 1.000000e-01 1.200000e-01
2002 Oct 29
1
pretty not pretty
Hi,
I have a following vector:
> smallch
[1] 0.0652840 0.1181300 0.0319370 0.0155700 0.0464110 0.0107850
[7] 0.0158970 0.0375900 0.0603090 0.0310300 0.0105920 0.0540580
[13] -0.0177740 0.0039393
Pretty (R 1.5.1) has problems with zero:
> pretty(smallch)
[1] -2.000000e-02 -3.469447e-18 2.000000e-02 4.000000e-02 6.000000e-02
[6] 8.000000e-02 1.000000e-01 1.200000e-01
2008 Mar 31
5
[LLVMdev] Additional Optimization I'm Missing?
Hello, I'm working on using the LLVM JIT for a little project of mine,
amazing work first off! I have a question about optimization passes. I
initially have this function I've created, in python it looks like this:
OS_end = 50OS_start = 0OS_timestep = 1birth_rate = .3population =
30.0for time in range(OS_start, OS_end, OS_timestep):
births = birth_rate * population
deaths = 0.1
2003 Jun 04
2
gam()
Dear all,
I've now spent a couple of days trying to learn R and, in particular, the
gam() function, and I now have a few questions and reflections regarding
the latter. Maybe these things are implemented in some way that I'm not yet
aware of or have perhaps been decided by the R community to not be what's
wanted. Of course, my lack of complete theoretical understanding of what
2004 Jul 13
2
confint.glm in a function
I can't get confint.glm to work from within a function. Consider
the following (using R 1.9.1, Windows 2000):
# FIRST: SOMETHING THAT WORKS FROM A COMMAND PROMPT
DF <- data.frame(y=.1, N=100)
(fit <- glm(y~1, family=binomial, data=DF,
weights=DF[,"N"]))
Call: glm(formula = y ~ 1, family = binomial, data = DF, weights =
DF[, "N"])
Coefficients: