similar to: c++ equivalent switch statement?

Displaying 20 results from an estimated 5000 matches similar to: "c++ equivalent switch statement?"

2010 Sep 01
2
Using packages built in linux in windows
Hi, I built a package in linux and would like to use it in windows. I cant build the package again in windows because it would miss the necessary libraries etc(I'm using Rcpp). So I need to generate a binary version and try to install it in windows. I tried this and I get the error /cygdrive/RTools/bin/cp: target 'xf->>' is not a directory Can someone help me with this? --
2010 Aug 20
1
Rserve (Anyone?)
REXP has an asBytes() method. Will this capture the output of an R plot function if a proper graphics device is used? It appears R insists on sending plot output to a file. Kind of strange since it insists on loading all your data into memory before it can do anything. If so then does anyone know what this would be? I prefer png or jpeg. Example: c is an RConnection REXP r =
2010 Aug 14
1
Creating list from a long vector
Stupid question, but its been a long night. If I have a long vector how can I turn it into a list of the same length x<-rep(seq(1,100,by=1),each=10) [[alternative HTML version deleted]]
2010 Aug 16
2
Random Number Generators and Sample
I am trying to get documentation about the random number generator used in "sample". The help for sample does not mention it. Can anyone point me in the right direction. Thanks [[alternative HTML version deleted]]
2010 Aug 20
1
R and Java
Hi folks, Maybe that is not the best place to ask, but I 'd like some of you could help me... I'm using jri to run R commands under Java, by its examples I can eval expressions, returning single values or vectors to my Java variables. But, I would like to know how to assign the values of a Java vector (like: double x[] = {1.7 , 2.8 , 3.4}; ) to a R variable, so I can eval a function
2010 Sep 15
3
characters in a string
Hi, I need to check if a string "<rh>a,b,c,d<rh>" is delimited by two "<rh>" 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique? [[alternative HTML version deleted]]
2010 Sep 26
2
get absolute file path
Hello, I get a value which stores a relative file name. (I get it from another function, which I don't want to change.) e.g. > fileName <- "../data/2010-08.csv"; Is it possible to get the absolute file path out of this value? (e.g. /home/sebastian/documents/data/2010-08.csv) Kind regards, Sebastian
2010 Sep 28
1
How to convert SEXP to double
Hello All, A simple question. I get some return from the R in my C++ program (via Rcpp package). The result come, as SEXP and it should be a simple numeric variable. How to convert it to double? The code, what i use: stringstream ss; ss << "p <- predict(fit_ar11, n.ahead = 2, doplot=FALSE);" << "p$pred[1]"; SEXP ans; int iRet =
2010 Aug 13
2
cacheSweave / pgfSweave driver for package vignette
Dear list, I wish to use a specific driver to process an sweave document in the inst/doc directory of a package. Specifically, I would like to use either cacheSweave or pgfSweave to speed up the creation of the vignette which requires lengthy computations. The same request would also apply to the highlight driver, to provide syntax highlighting of R chunks. In "writing R extensions" I
2010 Aug 13
2
cacheSweave / pgfSweave driver for package vignette
Dear list, I wish to use a specific driver to process an sweave document in the inst/doc directory of a package. Specifically, I would like to use either cacheSweave or pgfSweave to speed up the creation of the vignette which requires lengthy computations. The same request would also apply to the highlight driver, to provide syntax highlighting of R chunks. In "writing R extensions" I
2013 Apr 23
3
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please se
Hi guys when i''m doing bundle install i got this type of error whats this? please help me. rajesh@rajesh:~/workspace/Cybermedia_Test$ bundle install Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
2010 Aug 05
1
Sciviews-K -- object 'httpdPort' not found
Hi, I'm trying to install Sciviews-K on Linux Ubuntu 9.10 (karmic) but I'm not able to establish the connection between Komodo and R. Here;s the error I get, plus some diagnostic info: R version 2.9.2 (2009-08-24) R is SciViews ready! Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :   object 'httpdPort' not found > ls() [1] "svStart" > Sys.info()
2010 Aug 10
1
Identifying integers (as opposed to real #s) in matrix
Is there a way to identify (for subsequent replacement) which rows in a matrix are comprised entirely of *integers*? I have a large set of *nx3 *matrices where each row either consists of a set of 3 integers or a set of 3 real numbers. A given matrix might looks something like this: [ ,1] [ ,2] [ ,3] [1, ] 121.0000 -98.0000 276.0000 [2,
2009 Feb 22
3
line joining graphs
hi, I need to draw a line joining graphs,but abline stops within a graph.What do i do to cover portions between two graphs -- Rajesh.J [[alternative HTML version deleted]]
2009 Jul 10
2
drawing hmms
Hi, I need to draw hmm's in R.I also need to include a small plot near each state of the hmm.How can I do this? -- Rajesh.J [[alternative HTML version deleted]]
2009 Sep 10
2
Plot area reduction
Hi, I need my plot to occupy a thin strip-like area but the plot area in R is a square so when I save it and reduce its height to a strip in my document the font in the graph looks flattened. Is there someway i can do this in R itself?..so that my plot is a strip but the font looks normal -- Rajesh.J [[alternative HTML version deleted]]
2010 May 15
2
Normalizing plot tick values
Hi, I have a plot whole tick values along the axis have a certain range 0 - x . I need to normalize this range without changing my data files. for e.g., if my plot has tick values at 10,20,30,40,50... i have to make this 2,4,6, etc. but without changing the plot data... I am hoping I can add something to the plot command that goes like tick values divided by a quantity. Any help is appreciated.
2010 Aug 09
2
How to extract the conf.level out of t.test() data
Good afternoon everybody, I'm writing a little function to visualise hypothesis testing. Therefore I need to extract the confidence level of a t-test. Here a little example: x <- str(t.test(1:10) gives List of 9 $ statistic : Named num 5.74 ..- attr(*, "names")= chr "t" $ parameter : Named num 9 ..- attr(*, "names")= chr
2009 Jul 21
1
legend title in qplot
Hi, I've used the following command in qplot qplot(a$V1,geom="histogram",binwidth=0.15,fill = factor(a$V2),ylab="Frequency",xlab="Rate"); but the title in the legend shows up as factor(a$V2)...how can i change this? -- Rajesh.J [[alternative HTML version deleted]]
2009 Apr 17
1
multiplot plot spacing and text strip
Hi everyone, I have a certain requirement and I'm not sure what to do.I need to reduce the spacing between plots in a multiplot. Make them really close together such that they almost touch. Also, I need to add a rectangular strip under my plot(very close to it) such that the strip contains some text describing it. Any help is appreciated -- Rajesh.J [[alternative HTML version deleted]]