Displaying 5 results from an estimated 5 matches for "cf2".
Did you mean:
cf
2017 May 30
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
...t(sapply(setNames(,2:50), function(k) {x <- 1:k; MMline(x,x)})))
## intercept slope
## 2 0 1 # (special case fixed)
## 3 0 1
## 4 0 1
## 5 0 1
## ............
## 49 0 1
## 50 0 1
## "Harder": (sort ing!)
cf2 <- t(sapply(setNames(,2:50),
function(k) {x <- sample.int(k); MMline(x, -10*x)}))
stopifnot(abs(cf2[,"intercept"] - 0) < 1e-12,
abs(cf2[, "slope"] - -10) < 1e-12)
2011 Mar 14
2
color under lm line
Hi,
I would like to add a color under a lm line and not the plotted line. Is
this possible? In the example, I do not want the area under the curve red,
but rather under the llm line.
x=seq(0,5,len=100)
y=-(x-5)^2
llm<-lm(y~x)
plot(x,y)
polygon(c(x,x[length(x)]), c(y, y[1]), col='red')
abline(llm)
keith
--
M. Keith Cox, Ph.D.
Alaska NOAA Fisheries, National Marine Fisheries Service
2006 Nov 14
2
Matrix-vector multiplication without loops
Hi,
I am trying to do the following computation:
p <- rep(0, n)
coef <- runif(K+1)
U <- matrix(runif(n*(2*K+1)), n, 2*K+1)
for (i in 0:K){
for (j in 0:K){
p <- p + coef[i+1]* coef[j+1] * U[,i+j+1]
} }
I would appreciate any suggestions on how to perform this computation
efficiently without the "for" loops?
Thank
2017 May 29
3
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Here is an attached patch.
Best,
Serguei.
Le 29/05/2017 ? 12:21, Serguei Sokol a ?crit :
> The problem or actual R implementation relies on an assumption
> that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6)
> which reveals not to be true despite very trustful appearance.
>
> If we continue with the example of x=y=1:9
> then quantile(x, 1/6)=2.5 (here quantile()
2016 Nov 02
4
Llvm build is broken (at least on FreeBSD)
Current revision 285840 fails to build on FreeBSD.
I used the command:
cmake -G "Unix Makefiles" ../llvm -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX:PATH=/opt/llvm/current && gmake
(I am aware of FreeBSD llvm/clang ports, but the source build should
always succeed as well.)
Yuri
---errors---
Scanning dependencies of target gtest
[ 91%] Building CXX object