Hi all,
I have an image with many dots, and I would like to extract from it what is the x-y location of each dot.
I already know how to do this manually (there is a package for doing it).
However, is there some way of doing it automatically ?
(My next question will be - is there a a way, when having an image of many lines, to detect ...
I have run into a situation where I need to take all the extra arguments passed to an R function and roll them into an object for later use. I thought the previous question about ellipses in functions would help me, but I still can't quite grasp how to do this. Here is a very simple example of what I would like to do:
newmean <- functio...
I want to create a function that will retry an expression if it fails. Here's my working version:
retry <- function(.FUN, max.attempts=3, sleep.seconds=1) {
x <- NULL
if(max.attempts > 0) {
f <- substitute(.FUN)
x <- try(eval(f))
if(class(x) == "try-error") {
Sys.sleep(sleep.seconds)
return(suppressWarnings(...
So when I make plots sometimes I see the y crossing x at some offset. I generated this figure using:
ggplot(data=d2,aes(y=log10(Nems+1),x=Time)) +
geom_point(size=3,shape=1) +
geom_line(data=d2,aes(x=time_model,y=log10(value),group=variable,linetype=variable)) +
ylim(0.001,2) + no_bg + draw_axis
I end up manually moving ...
I am running R on a multiple node Linux cluster. I would like to run my analysis on R using scripts or batch mode without using parallel computing software such as MPI or snow.
I know this can be done by dividing the input data such that each node runs different parts of the data.
My question is how do I go about this exactly? I am ...
Hello,
I am trying to pass data from SQL, to C#, then to an R server for data analysis then back to my web application; however, the COM interface that I am using does not allow complex data types to be passed between C# and R (no data tables). I have gotten it to work in the past by using the following code:
int count = dataTable....
I am an R novice and am having some challenges. I am dealing with a large dataframe which I have read from a csv file. My numerical vectors contain NAs which are stopping me from running analyses. How do I get rid of these NAs so I can actually do something with my data?
...
I am looking for a good Netbeans plugin for R. Any suggestions?
...
I work with machine learning with fairly large datasets (they still fit in memory) and I have written some calculations in R which I find to be too slow. Thus I would like to replace the "critical parts" of the program with compiled code that I would call from R. An example problem that I have in hand is implementing the forward-backward...
Hello.
I'm trying to write a function to do some often repeated analysis, and one part of this is to count the number of groups and number of members within each group, so ddply to the rescue !, however, my code has a problem....
Here is some example data
> dput(BGBottles)
structure(list(Machine = structure(c(1L, 1L, 1L, 2L, 2L, 2L,
...
Format consist of lines, every line has set of key="value" elements.
Format example:
X="1" Y="2" Z="who are you?"
Y="4" Z="bla bla..."
X="42"
I would like to import this data into R, table or data.frame, where key defines column.
Thanks!
...
If I create a multi-plot window with par(mfrow=...), is it possible to send data to a specific plot (i.e. "the one in the lower left corner") or is the plotting always necessarily sequential? Is there a package for R that does something like this?
For those that are interested, this problem arises out of the fact that R is a single-thr...
I fit a count model to a vector of actual data and would now like to plot the actual and the predicted as a grouped (dodged) bar chart. Since this is a count model, the data are discrete (X=x from 0 to 317). Since I am fitting a model, I only have already-tabulated data for the predicted values.
Here is how my original data frame looks:...
Hi All,
I am very new to LaTex and R, but I am learning on a daily basis. I really am getting into using Eclipse and want to join the party and start automating my work using Sweave; I am excited for the prospects.
That said, I followed Jeromy's post here and think (keyword, think) that everything is set up correctly. However, since ...
Hi All,
I'm having small problem with the size of the graphical device when running R on ubuntu netbook.
Netbook's screen size is relatively small (1024 x 576), so when I create a chart in R say simply
plot(sin)
The graph is bigger than my screen size. I have to manually resize it.
Solution posted on ubuntu forum doesn't work for s...
I'm a relatively new user to R and Emacs and was wondering if Emacs could automatically correct any R commands that i've typed wrong. I know about the alt-/, but I was more thinking along the lines of if i type read.tale, it corrects it to read.table.
Also, I was using emacs the other day and whenever i typed read.table, it showed the u...
I have a number of tables with text around them describing them. Something like this:
This table shows blah blah...
<<echo=FALSE, results=tex>>=
print(
xtable(x,
caption = "blah", label = "tab:four", table.placement = "tbp", caption.placement = "top")
, size = "small", table.placement="ht")
@
This table shows blah blah....
From the get go: sorry if I'm not using the proper emacs terminology -- I'm relatively wet behind the ears in the emacs world.
Most of my work in emacs is for programming R, and I'm using ESS and ECB to do so quite happily. I'd like to build a custom ECB layout which uses the entire bottom of the screen as my R console, while putting so...
I have a plot with many overlapping points (goes from 2-10). Adding jitter to the points makes it very noisy and unappealing. I like adding a alpha in the aesthetics. However, I'd like to have a legend where a reader can see how many points are overlapping for each of those transparencies. Is there such a way?
ggplot(data=mydata,aes(x=x...
One thing I want to do all the time in my R code is to test whether certain conditions hold for a vector, such as whether it contains any or all values equal to some specified value. The Rish way to do this is to create a boolean vector and use any or all, for example:
any(is.na(my_big_vector))
all(my_big_vector == my_big_vector[[1]])
...