Displaying 20 results from an estimated 31 matches for "1e2".
Did you mean:
12
2001 Nov 02
1
Look, Watson! La.svd & ATLAS
...s a collaborative project with many contributors.
Type `contributors()' for more information.
Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.
> set.seed(1)
> x <- matrix(runif(1e4), 1e2, 1e2)
> invisible(La.svd(x)) # This ran fine.
> x <- matrix(runif(1e5), 1e3, 1e2)
> invisible(La.svd(x))
(Dr. Watson says there's an access violation.)
So far La.svd is the only thing I know of that generates Dr. Watson.
The version info:
_...
2008 Apr 10
1
ISOdate/ISOdatetime performance suggestions, other date/time questions
...dly anything simpler than on double values...
Thanks in advance for your comments,
Oleg
It's common in finance to work with time stamps stored in a form like
%Y%m%d.%H%M%OS, e.g. 20080410.140444 for now, this is what 'ts' in the
example below is:
ts = 1e4*trunc(rnorm(50000,2008,2)) + 1e2*trunc(runif(50000,1,12)) +
trunc(runif(50000,1,28)) + 1e-2*trunc(runif(50000,1,24)) +
1e-4*trunc(runif(50000,1,60)) + 1e-6*runif(50000,1,60)
posix.viaISOdate = function(x) {
date = trunc(x at .Data)
time = round(1e6*x at .Data%%1,2)
rtime = round(time)
z = list(sec=rtime...
2001 Nov 06
1
R-devel & ATLAS generates Dr. Watson on NT (was RE: Look, Wa tson! La.svd & ATLAS)
...ions of ATLAS 3.2.1. One was compiled on my old Thinkpad
600E (PII), the other was compiled on my new Thinkpad T22 (PIIISSE1).
I compiled R-devel dated 10/31, 11/01 and 11/04, linked against either of
the two ATLAS libs. All gave Dr. Watson when given this code:
La.svd(matrix(runif(1e5), 1e3, 1e2))
(There's no problem with smaller matrices, say 100x100.)
When compiled without ATLAS, the above code ran fine in all three R-devel's.
I tried R-1.3.1 with both ATLAS libs, and both ran fine.
Any ideas on what could be wrong? Seems like R-devel doesn't like ATLAS, at
least on WinN...
2009 Oct 13
3
Selecting initial numerals
...e a new object with the first two numerals of the data.
Not sure why this isnt working, consider the following:
EmpEst$naics=c(238321, 624410, 484121 ,238911, 811111, 531110, 621399,
541613,
524210 ,236115 ,811121 ,236115 ,236115 ,621610 ,814110 ,812320)
EmpEst$naics2<-formatC(EmpEst$naics %% 1e2, width=2, flag="", mode
="integer")
#RESULT:Warning message:
#In Ops.factor(EmpEst$naics, 100) : %% not meaningful for factors
EmpEst$naics2<-format(EmpEst$naics,trim=FALSE,digits=2,width=2)
#RESULT
#Changes data to string
I know this is super simple but im not sure why...
2009 May 20
1
sem with categorical data
...jfox/Misc/sem/SEM-paper.pdf.
When I apply the hetcor function, I receive the following error:
Error in checkmvArgs(lower = lower, upper = upper, mean = mean, corr = corr,
:
at least one element of 'lower' is larger than 'upper'
Example:
set.seed(781)
q1 <- cut2(x = rlnorm(n = 1e2, m = 2), cuts = seq(1,6))
q2 <- cut2(x = rlnorm(n = 1e2, m = 0), cuts = seq(1,6))
q3 <- cut2(x = rlnorm(n = 1e2, m = 1), cuts = seq(1,6))
dat <- data.frame(q1,q2,q3)
hetcor(data = dat, ML = T, pd = T, use = 'p')
Any help in understanding and correcting the error would be appreciat...
2016 Oct 28
2
Encontrar la primera columna no NA
...p(NA , numero /2e0
)) , size = numero ) ,
dos = sample( c(runif(numero) , rep(NA , numero /1e1
)) , size = numero ) ,
tres = sample( c(runif(numero) , rep(NA , numero /2e1
)) , size = numero ) ,
cuatro = sample( c(runif(numero) , rep(NA , numero /1e2
)) , size = numero ) ,
cinco = sample( c(runif(numero) , rep(NA , numero /2e2
)) , size = numero ) ,
seis = sample( c(runif(numero) , rep(NA , numero /1e3
)) , size = numero )
)
First_month <-
apply(X = dat, MARGIN = 1, FUN =...
2016 Oct 27
4
Encontrar la primera columna no NA
...o /2e0
)) , size = numero ) ,
dos = sample( c(runif(numero) , rep(NA , numero /1e1
)) , size = numero ) ,
tres = sample( c(runif(numero) , rep(NA , numero /2e1
)) , size = numero ) ,
cuatro = sample( c(runif(numero) , rep(NA , numero /1e2
)) , size = numero ) ,
cinco = sample( c(runif(numero) , rep(NA , numero /2e2
)) , size = numero ) ,
seis = sample( c(runif(numero) , rep(NA , numero /1e3
)) , size = numero )
)
apply(X = dat, MARGIN = 1, FUN =
function(x){...
2010 Jan 11
1
Help me! using random Forest package, how to calculate Error Rates in the training set ?
now I am learining random forest and using random forest package, I can get
the OOB error rates, and test set rate, now I want to get the training set
error rate, how can I do?
pgp.rf<-randomForest(x.tr,y.tr,x.ts,y.ts,ntree=1e3,keep.forest=FALSE,do.trace=1e2)
using the code can get oob and test set error rate, if I replace x.ts and
y.ts with x.tr and y.tr,respectively, is the error rate in the training set
?
pgp.rf<-randomForest(x.tr,y.tr,x.tr,y.tr,ntree=1e3,keep.forest=FALSE,do.trace=1e2)
this time, I get oob error rates and training set...
2016 Oct 27
2
Encontrar la primera columna no NA
...numero) , rep(NA , numero /2e0 )),
size = numero ) ,
dos = sample( c(runif(numero) , rep(NA , numero /1e1 )),
size = numero ) ,
tres = sample( c(runif(numero) , rep(NA , numero /2e1 )) ,
size = numero ) ,
cuatro = sample( c(runif(numero) , rep(NA , numero /1e2 )) ,
size = numero ) ,
cinco = sample( c(runif(numero) , rep(NA , numero /2e2 )) ,
size = numero ) ,
seis = sample( c(runif(numero) , rep(NA , numero /1e3 )) ,
size = numero )
)
t <- Sys.time()
First_month <-
dat %>%
apply( MARGIN = 1, FUN =...
2016 Oct 27
3
Encontrar la primera columna no NA
...numero) , rep(NA , numero /2e0 )),
size = numero ) ,
dos = sample( c(runif(numero) , rep(NA , numero /1e1 )),
size = numero ) ,
tres = sample( c(runif(numero) , rep(NA , numero /2e1 )) ,
size = numero ) ,
cuatro = sample( c(runif(numero) , rep(NA , numero /1e2 )) ,
size = numero ) ,
cinco = sample( c(runif(numero) , rep(NA , numero /2e2 )) ,
size = numero ) ,
seis = sample( c(runif(numero) , rep(NA , numero /1e3 )) ,
size = numero )
)
t <- Sys.time()
First_month <-
dat %>%
apply( MARGIN = 1, FUN =...
2009 Dec 10
1
Antwort: Re: Crash with Unicode and sub (PR#14114)
...ing SUSE + WINE. Is it
possible to run that lot on top of valgrind? Of course, it will probably
take all day ...
If not, I have a clue which might help. The problem seems to lie in the
"sub" routine. In the original report I used
-- cut here --
gctorture()
u <- intToUtf8(c(rep(1e3,1e2),32,c(rep(1e3,1e2))))
v <- rep(u,1e2)
v <- sub(" ","",v)
v %in% ""
-- cut here --
I've tried reducing this a bit more. Replacing intToUtf8 with a direct
assignment writing out the string with Unicode escapes seems to make no
difference. The %in% can be rep...
2009 Dec 07
3
Crash with Unicode and sub (PR#14114)
Full_Name: George Russell
Version: 2.10.0
OS: Windows XP Version 2002 SP 2
Submission from: (NULL) (217.111.3.131)
The following typed into R --vanilla induces a crash:
-- cut here --
gctorture()
u <- intToUtf8(c(rep(1e3,1e2),32,c(rep(1e3,1e2))))
v <- rep(u,1e2)
v <- sub(" ","",v)
v %in% ""
-- cut here --
sessionInfo() says:
-- cut here --
R version 2.10.0 (2009-10-26)
i386-pc-mingw32
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=Ger...
2004 Feb 05
0
correction to the previously asked question (about mergin g factors)
...antly).
Here's a test of all three. See the function definitions below.
> f1 <- factor(sample(letters[1:3], 1e4, replace=TRUE))
> f2 <- factor(sample(letters[3:5], 1e4, replace=TRUE))
> f3 <- factor(sample(letters[5:7], 1e4, replace=TRUE))
>
> system.time(for (i in 1:1e2) mf <- mergeFac(f1, f2, f3))
[1] 4.54 0.00 4.73 NA NA
> system.time(for (i in 1:1e2) mf2 <- mergeFac2(f1, f2, f3))
[1] 3.95 0.01 4.11 NA NA
> system.time(for (i in 1:1e2) mf3 <- mergeFac3(f1, f2, f3))
[1] 3.61 0.00 3.76 NA NA
> all(mf == mf2)
[1] TRUE
> all(mf == mf...
2012 Dec 27
4
vectorization & modifying globals in functions
...le.int(length(d), size = 2)
if (d[a[1]] >= 1) {
d[a[1]] <- d[a[1]] - 1
d[a[2]] <- d[a[2]] + 1
}
}
--8<---------------cut here---------------end--------------->8---
it does what I want, i.e., modified vector d 100 times.
Now, if I want to repeat this 1e6 times instead of 1e2 times, I want to
vectorize it for speed, so I do this:
--8<---------------cut here---------------start------------->8---
update <- function (i) {
a <- sample.int(n.agents, size = 2)
if (d[a[1]] >= delta) {
d[a[1]] <- d[a[1]] - 1
d[a[2]] <- d[a[2]] + 1
}
entropy...
2020 Feb 26
1
Profiling: attributing costs to place of invocation (instead of place of evaluation)?
...the following example:
f <- function(expr) g(expr)
g <- function(expr) {
? h(expr)
}
h <- function(expr) {
? expr # evaluation happens here
? i(expr)
}
i <- function(expr) {
? expr # already evaluated, no costs here
? invisible()
}
rprof <- tempfile()
Rprof(rprof)
f(replicate(1e2, sample.int(1e4)))
Rprof(NULL)
cat(readLines(rprof), sep = "\n")
#> sample.interval=20000
#> "sample.int" "FUN" "lapply" "sapply" "replicate" "h" "g" "f"
#> "sample.int" "FUN" &quo...
2010 Nov 12
1
Xapply question
...lar y
+ c (sum (x^2), y)
+ }
> result <- matrix (NA, nrow = nrow (A), ncol = 2)
> for (r in 1 : nrow (A))
+ result [r,] <- f (A [r,], v [r])
> result
[,1] [,2]
[1,] 1.124 1
[2,] 5.637 2
[3,] 2.976 3
The matrix will easily be in the range of 1e4 - 1e5 rows x 1e2 - 1e3 columns, so
I do not want to split it into a list and combine it afterwards.
The reason why I ask for a function is partly also because I want to overload
the functionality for a specific class and I don't think it's a good idea to
invent a name for something that probably already...
2020 Sep 01
2
Vector evolution?
...nd upgrade the vector width?
On the other hand if I do the following loop:
void fct7(float *x)
{
#pragma clang loop vectorize(enable)
for (int i = 0; i < 4 * 256; ++i)
x[i] = 7 * x[i];
}
It compiles it to:
00000000000001e0 <_Z4fct7Pf>:
1e0: 31 c0 xor %eax,%eax
1e2: c4 e2 7d 18 05 00 00 vbroadcastss 0x0(%rip),%ymm0 # 1eb
<_Z4fct7Pf+0xb>
1e9: 00 00
1eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
1f0: c5 fc 59 0c 87 vmulps (%rdi,%rax,4),%ymm0,%ymm1
1f5: c5 fc 59 54 87 20 vmulps 0x20(%rdi,%rax,4),%ymm0,%ymm2
1fb: c5 fc 59 5c 87 40...
2010 Aug 25
1
Trying to configure R to use acml_mp
Hi, I'm following up to a post I made to r-help here:
http://r.789695.n4.nabble.com/Trouble-configuring-R-to-use-ACML-tt2337193.html#a2337193
I have verified that LD_LIBRARY_PATH is set... I set it in /etc/bash.bashrc
(is that ok?) and it shows up when I echo $LD_LIBRARY_PATH I also tried
adding the paths to the ld.so cache as Prof Ripley had suggested. I get the
same results when running
2001 Nov 26
0
debugging R-devel on WinNT (was RE: zlib location)
...gnuwin32, src/gnuwin32/graphapp, and src/gnuwin32/front-ends),
but still get the same thing.
Also, as R starts, I get a bunch of dialog boxes that complained about DLL
relocated. Is this normal?
If I just type "c" and run Rgui, and issue the command
"La.svd(matrix(runif(5e4), 5e2, 1e2))", I get a few more dialog boxes, one
saying "Invalid address specified to RtlFreeHeap(9f0000, 1efde80)", another
saying "HEAP(Rgui.exe)", and a SIGTRAP is generated.
I did one more (crazy? stupid?) thing: I replaced the lapack.c in R-devel
(dated Nov. 14, 2001) with the...
2012 Jul 02
2
save conditions in a list
Hi
how would you save conditions like
a = "day > 100"; b = "val < 50"; c = "year == 2012"
in a list? I like to have variables like "day", "val", "year" and a list
of conditions list(a,b,c). Then I want to check if a & b & c is true or
if a | b | c is true or similar things.
Greetings
Christof