Displaying 20 results from an estimated 48 matches for "worik".
2010 Jun 16
5
t-test problem
....1$p.value
[1] 0.646054
I would have thought these would have been the same. Like below....
> t.2 <- t.test(x2, y2)
> 2 * pt(t.2$statistic, t.2$parameter)
t
0.8679732
> t.2$p.value
[1] 0.8679732
This is what I expect.
clearly I misunderstand some thing. What is it?
cheers
Worik
[[alternative HTML version deleted]]
2009 Sep 24
2
Date formats in as.Date
...h this:
as.Date("Sep-1981", format="%b-%Y")
Returns "NA"
>From documentation for strftime
'%b' Abbreviated month name in the current locale. (Also matches
full name on input.)
'%Y' Year with century.
What am I doing wrong?
cheers
Worik
[[alternative HTML version deleted]]
2011 Nov 11
3
Why does length("") == 1?
It seems obvious to me that the empty string "" is length 0.
cheers
Worik
[[alternative HTML version deleted]]
2012 Nov 30
3
Line numbers with errors and warnings?
...port?
I have a long script and an error:
Error in `[.xts`(x, xsubset) : subscript out of bounds
It would be very helpful, and save a lot of time, if there was some
indication in the error message which line the error was.
I can find it using binary search but that is a painful process.
cheers
Worik
[[alternative HTML version deleted]]
2011 Dec 18
1
Looking for package 'rgp'
I am interested in the package 'rgp'
But....
> install.packages("rgp")
Installing package(s) into ‘/home/worik/R/x86_64-pc-linux-gnu-library/2.12’
(as ‘lib’ is unspecified)
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘rgp’ is not available
It is in cran: http://cran.r-project.org/web/packages/rgp/index.html
How do I install it?
cheers
Worik
[[alternative HTML ve...
2012 Nov 12
1
System problem: Sys.time() returns GMT, says NZDT
When I say:
> Sys.time()
[1] "2012-11-12 21:30:14 NZDT"
>
But that is not what my clock on the wall and my system say. Cannot show
you my clock but...
worik@lemy:/tmp$ date
Tue Nov 13 10:32:20 NZDT 2012
Sys.time() is returning GMT
$version.string
[1] "R version 2.14.1 (2011-12-22)"
> Sys.timezone()
[1] "NZDT"
>
I'm a little lost!
Worik
[[alternative HTML version deleted]]
2012 Oct 09
4
Modern Symbolic debugger for R programmes?
...neNum work. I get "No source
refs found.". I am starting to loose my mind!
A debugger where I could set breakpoints with a little more
granularity than the function level and a little more accessible than
the trace function. What I ideally want is GDB for R.
Does that exist?
cheers
Worik
2011 May 08
2
Pretty printing numbers
...o be formated to set the digits
parameter but that is complex and leaves me insecure that thre may be other
problems I have not uncovered.
Is there a simple way of using library functions to insert big.marks and get
the number of trailing digits correct? Perhaps some way of using sprintf?
cheers
Worik
[[alternative HTML version deleted]]
2012 Mar 25
2
Weird POSIXct behaviour
...]> class(Time)
[1] "POSIXct" "POSIXt"
Browse[2]> class(index(DATA.ba[[p]]["2012-03-20 00:59:57","bid"]))
[1] "POSIXct" "POSIXt"
So the variable 'Time' should be good to index DATA.ba[[p]]. I am
hopelessly confused.
cheers
Worik
[[alternative HTML version deleted]]
2010 Jun 08
2
Logical vector question
...UE FALSE FALSE FALSE FALSE
[13] FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE
OK so far but I try...
> v1<.3 || v1>.7
[1] TRUE
>
Not a vector.
I have tried a lot of combinations culminating in...
ifelse(((v1<.3) || (v1>.7)), TRUE, FALSE)
[1] TRUE
>
What can I do?
cheers
Worik
> v1
[1] 1 1 1 0 0 0 0 0 0 1
> v2
[1] 1 1 1 0 1 0 0 0 1 1
The
[[alternative HTML version deleted]]
2008 Apr 23
2
Incrementing Dates
How can I increment the value of a Date class?
I want to add a day, month or year to a date.
cheers
Worik
[[alternative HTML version deleted]]
2009 Sep 01
2
Is this a bug?
...:3){
for(j in 1:(5-1)){
for(k in (j+1):5){
for(l in (j+2):5){
print(paste("1 JKL:", j,k,l,sep=" "))
}
}
}
}
Prints out (among other things)
[1] "1 JKL: 4 5 6"
That is for(l in (j+2):5) sets l to 6 one more than the upper limit.
cheers
Worik
[[alternative HTML version deleted]]
2010 Mar 18
1
Locating an error
...lf an hour or so fails with an
error
Error in x[value] <- NA : only 0's may be mixed with negative subscripts
How can I find out where that error occurs?
If I have to do a binary search using error messages it will take a long
time! Is there some way I can generate a stack trace?
cheers
Worik
[[alternative HTML version deleted]]
2011 May 19
1
Finding row in matrix with minimum column
Friends
If I have a matrix such as...
[,1] [,2]
[1,] 7 7
[2,] 7 9
[3,] 9 2
[4,] 7 9
And I want to find the row number that has the minimum value of column 2
(row 3 in this case) how can I do it? Is there a simple way?
cheers
Worik
[[alternative HTML version deleted]]
2011 Sep 13
1
Getting Rcpp SEXP data in C++
...;package:TTR");
Rcpp::Function sma = TTR["SMA"];
SEXP sma_res = sma(rv);
How do I get the values of sma_res from a SEXP type into something
useful in C++, like a vector<float>?
Where can I find some documentation of SEXP? I have tried googling it
to no avail.
cheers
Worik
[[alternative HTML version deleted]]
2008 May 11
1
Creating data.frames dynamically
...ed data into d
for(i in SomeVectorOfFactors){
for(N in Names){
d[[N]][i] <- FunctionCallOfSomeSort(i)
}
}
I want to create the data.frame, d, in the same style I access it.
d <- data.frame(dates=Dates, [[Names]]=vectors(.....))
Then it is much simpler to add new columns.
Worik ST
[[alternative HTML version deleted]]
2005 Jul 23
2
cor(X) with P-Value
...2 -0.06190365 1 0.2643529 ...
P 0.4517 0.001080 ...
:
:
I think I could write a function for it if such a function does not exist
if I could do...
> CT23 <- cor.test(X2, X3)
> CT23$P
0.001080
> CT23$V
0.2643529
But I do not know how.
cheers
Worik
2012 Apr 19
2
Trouble with [sv]apply
...> V.f()
1 matrix 1 7
2 matrix 2 7
Error in vapply(c(1, 2), A.f, rep("a", 7)) :
values must be length 7,
but FUN(X[[2]]) result is length 14
>
Calling S.f() returns a list.
Do I have to accept I am going to be getting a list and I have to
assemble a matrix in a loop?
cheers
Worik
2011 Sep 02
2
Advice on large data structures
...nctions of (windows of) two columns.
I have been looking at the ff and bigmemory packages but am not sure that
they will do.
Before I get too deep can some one offer some wisdom about what the best
direction to go would be?
Switching to C/C++ is definitely an option if it is all too hard
cheers
Worik
[[alternative HTML version deleted]]
2010 Apr 26
2
woriking under webrick but not under passenger
Hi!
I have just added login feature to my rails application (followed the
instruction from (Agile Web Development with Rails) but now I am getting
strange errors (looks to me like some kind of routing problem) under the
passenger/apache.
The error is:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
From the log: