Displaying 20 results from an estimated 8000 matches similar to: "Looking for package 'rgp'"
2012 Oct 09
4
Modern Symbolic debugger for R programmes?
I think I am whistling in the wind, but is there a modern symbolic
debugger for R programmes?
I am working through some one else's code, thousands of lines, that
has the occasional bug in it, and a lot in my understanding of it.
I cannot make setBreakpoint or findLineNum work. I get "No source
refs found.". I am starting to loose my mind!
A debugger where I could set
2011 May 05
2
Looking for equivalent for "strstr"
Friends
This is an elementary question. Is there is a built in R function for
finding a sub-string in another string? Like strstr in C.
I can easily roll my own, but if there is a built in that is one less thing
I can do 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]]
2009 Sep 24
2
Date formats in as.Date
I have trouble with 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]]
2010 Oct 01
3
gridExtra question
?
Hi:
I get?a couple of warnings? when trying to download gridExtra:
install.packages("gridExtra",repos=http://R-Forge.R-project.org)
?Warning: unable to access index for repository
http://R-Forge.R-project.org/bin/windows/contrib/2.10
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
? package ?gridextra? is not available
I would like to download the binary
2010 Jun 16
5
t-test problem
I have two pairs of related vectors
x1,y1
and
x2,y2
I wish to do a test for differences in means of x1 and y1, ditto x2 and y2.
I am getting odd results. I am not sure I am using 'pt' properly...
I have not included the raw vectors as they are long. I am interested if I
am using R properly...
> c(length(x1), length(y1), length(x2), length(y2))
[1] 3436 1619 2677 2378
First
2011 Aug 16
1
Problems installing SJava
Hello, I am trying to install SJava but I haven't been able to complete it
successfully. I have tried to install it from bioconductor using the
followin code and got the following output:
> source("http://www.bioconductor.org/biocLite.R")
BioC_mirror = http://bioconductor.org
Change using chooseBioCmirror().
> biocLite("SJava")
Using R version 2.12.2, biocinstall
2011 Sep 15
1
how to install a locally built package
Hello useRs,
I am trying to put my funcs in a package to avoid clutter in my workspace as the funcs are now in .Rprofile.
All plain R code no compilations. Using win XP with a full cygwin install and R2.12
I first did
package.skeleton("mypack",list="getdfv", namespace=T) # just a single func
which created a folder with the required stuff in it.
Calling R CMD build creates a
2011 Aug 12
1
install packages from intranet
Hi,
I'm new to R. Apologies if this is a simple query, I've searched the mailing lists and docs but can't find a solution to my problem.
I'm trying to make some packages available on our intranet. During development the 'intranet' is a webserver running on localhost.
* When I call "install.packages" I get a mesage about not being able to access 'index
2010 Jun 13
2
Scope and sapply
I am puzzled by the scope rules that apply with sapply.
If I want to modify a vector with sapply I tried...
N <- 10
vec <- vector(mode="numeric", length=N)
test <- function(i){
vec[i] <- i
}
sapply(1:N, test)
vec
but it not work.
How can this be done?
Worik
[[alternative HTML version deleted]]
2012 Apr 19
2
Trouble with [sv]apply
Friends
I clearly donot understand how sapply and vapply work.
What I have is a function that returns a matrix with an indeterminate
number of rows (some times zero) but a constant number of columns. I
cannot reliably use an apply function to assemble the matrices into a
matrix. I am not sure it is possible.
I can demonstrate the core of my confusion with this simple code.
A.f <-
2012 Nov 30
3
Line numbers with errors and warnings?
Is it possible to get a line number with an error report?
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 May 08
2
Pretty printing numbers
Friends
I am trying to format a number to a string so 2189.745 goes to "2,189.35"
and 309283.929 goes to "309,283.93"
I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f")
but it does not get the number of decimals correct. Specifying digits does
not work as that is significant digits. I could use a switch statement
switching on
2011 Sep 13
1
Getting Rcpp SEXP data in C++
Friends
I am looking at Rcpp and I am a bit stuck on a simple matter.
(I am calling R from c++, if there is a better way...)
Given this simple example using the TTR package and the SMA function which
returns a simple moving average....
Rcpp::NumericVector rv;
for(int i = 0; i < 100; i++){
rv.push_back(rand());
}
Rcpp::Environment TTR("package:TTR");
2010 Mar 18
1
Locating an error
I have a large programme that after running half 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]]
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]]
2011 Jan 19
1
Installing package in windows 7
Hi all,
I was trying to install a package called ei from this
http://gking.harvard.edu/eiR link . With GCC, r-base-dev and some other R
package dependencies installed it works perfect in my Ubuntu Linux system.
Now I am trying to install the same in Windows 7 environment. So far my
setup is as follows,
1. R installed in home folder (c:\Users\username\R-2.12.1\R. It is set to
run as
2012 Mar 25
2
Weird POSIXct behaviour
Friends
I have an xts that I wish to access.
Browse[2]> DATA.ba[[p]]["2012-03-20 00:59:57","bid"]
bid
2012-03-20 00:59:57 1.4993
So far so good.
Now putting the index into a variable:
Browse[2]> Time
[1] "2012-03-20 00:59:57 NZDT"
Browse[2]> DATA.ba[[p]][Time, "bid"]
bid
Where has it gone?
Looking closer....
2010 Jun 08
2
Logical vector question
If I create a vector thusly
> v1 <- runif(20, min=0, max=1)
> v1
[1] 0.9754443 0.6306228 0.3238158 0.3175769 0.6791534 0.6956507 0.3840803
[8] 0.1421328 0.8592398 0.4388306 0.9472040 0.4727435 0.5645302 0.7391616
[15] 0.6116199 0.2727754 0.2657867 0.5261744 0.8764804 0.2032126
And I want to create a logical vector the same length that is true if v1<.3
or v1 > .7 how do I do it
2010 Apr 28
1
What is the best way to plots surfaces in 3 dimensions?
Hi R help,
What is the best way to plots surfaces in 3 dimensions?
I also have the following availability problem with "plot3d" and "scatterplot3d", and "wireframe":
install.packages("scatterplot3d")
Warning: unable to access index for repository http://cran.ch.r-project.org/bin/macosx/leopard/contrib/2.10
Warning message:
In getDependencies(pkgs,