« first day (209 days earlier)      last day (3602 days later) » 

12:26 AM
I'll leave it here if @Reed from http://stackoverflow.com/q/19016866/1201032 ever comes here, as I told him I could show him some improvements for his function:

qsub <- function(string, ...) {

args.df <- data.frame(..., stringsAsFactors = FALSE)
patterns <- names(args.df)
m <- ncol(args.df)
n <- nrow(args.df)
cmds <- rep(string, n)

for (i in seq_len(n))
for (j in seq_len(m))
cmds[i] <- gsub(patterns[j], args.df[i, j], cmds[i])

cat(paste(">", cmds), sep="\n")

for(cmd in cmds) eval(parse(text = cmd), envir = parent.frame())
 
 
7 hours later…
7:24 AM
@Arun data.table was already awesome, but if you are joining the development team...
 
@Arun great work! congrats
 
 
1 hour later…
8:42 AM
Does someone understand what he is trying to do ?
0
Q: Bar plot with broken y-axis and log x-axis

user1912925I am looking to present a variable as a bar plot with the caveat that the groups I am trying to plot (the size of an object) vary over several orders of magnitude. The other complication of the data is that the variable y also varies over several orders of magnitude when positive as well as havin...

Maybe I'm in a bad mood this morning, but I vote to close for unclear :
-1
Q: manipulating a set of files in a loop in R

user2809288I am trying to use manipulate a file within a loop. Here's my code: k=0 for (i in 1:3) { name=paste("file",i,sep="_") assign(name,k) k = k+1 ls(file_i) } In line 7, I try to list objects of the corresponding file (file_1 when i=1, file_2 when i=2 and file_3 when i=3), but my method doesn't see...

 
 
5 hours later…
1:44 PM
I'm having some trouble setting up Rcpp. Are administrator rights required to use it? It seems to work in an admin-spawned R console, but not in a normal one (spawned by notepad++). [oh I think I know what to do:] Can I save Rcpp functions compiled in one session for use in another?
Oh, I guess not. When I save and load them, they're just pointers at NULL/nil
f***!@#$, question resolved: stackoverflow.com/questions/15193384/…
One final clarification @DirkEddelbuettel (following up on the question I just found an answer to): do you know of a way to use Rcpp without running R as an administrator? (I am accessing a network remotely. I was able to install Rtools but it couldn't adjust the PATH during the installation. I figure if the administrators can edit the path for me, and I can use Rcpp without admin privileges, then I'll be good-to-go...)
 
2:25 PM
@Frank I have no idea. I hardly work on Windows but when I do I am usually set up as admin. Though if you are not admin you should always be able to adjust PATH in the cmd.exe session you are in. I'd ask on rcpp-devel, more windows users there.
 
Possible duplicate :
0
Q: X and Y axis intersect at 0

user1759438I have used the following code to generate this plot: x<-c(0.916, 0.815, 0.101, -0.029, -0.166, 0.949, 0.073 , -0.054, 1.006) y<-c(3.91, 5.17, 1.08, 1.28, 1.01, 4.37, 3.97, 0.77, 4.52) plot(x,y, ylim=c(0, 8), xlim=c(-0.4, 1.2), pch=19, cex=0.6, cex.axis=1, cex.lab=1, yaxs='i', xaxs='i', las=1, ...

 
@DirkEddelbuettel Okay, thanks for the tip.
 
 
5 hours later…
7:27 PM
not sure this is worthy of a question or not: is there a way to pass two arguments into a function in aggregate()?
 
Possible duplicate:
0
Q: ifelse() with possible equality

user1723765I would like to apply a simple ifelse statement to a situations where >, < and = can all happen. Normally I would just use ifelse(b>a,0,1) but what if b=a?

 
@AndyClifton Did you try it? What happened as a result?
 
I couldn't figure out what to put in the formula. Given a data frame with time, z, value, I want to apply a function to all of the z and value that occur at the same time. I tried by() and its sooooo slow
 
@AndyClifton Have you looked at data.table? Aggregating is very easy with data.table, and very fast.
 
I thought that might be the solution, but I was trying to avoid having to learn data tables. On a good day I just about feel brave enough to tackle apply().
 
7:40 PM
Like I said, aggregating is very easy with the data.table package. Not much of a learning curve at all.
 
could you give me an idea of the functions I should be looking at?
 
The basic structure would be something like: DT[, your_agg_fun(var_to_agg), by = "your_id_vars"] (where DT is the name of your data.table).
With aggregate it's more like aggregate(var_to_agg ~ your_id_vars, your_data_frame, your_agg_fun).
 
@BlueMagister Sorry I wasn't more help on your legend alpha level question!
 
@AnandaMahto. Thanks for the ideas. aggregate() I understand. When I said I was having trouble with the formula, I meant the first argument in the call to argument(). It's not possible to aggregate in a way that you can apply a function to both of the columns together (as far as I can tell). The function is applied to each column, separately.
@AnandaMahto Turns out that by() was a reasonable solution. The reason it was so slow was the 60 Mb data frame..
 
8:11 PM
@joran Thanks for looking into it! I suspected the standard error ribbon was the issue, but I didn't know how to turn it off; thanks to your comment, now I do. I'll wait a day or two to see if a solution that keeps the ribbon is out there. (Here's a link to the question for others in the chat room)
 
@BlueMagister As I said, I'm not convinced it isn't a bug of some sort. @kohske wrote the guides code, so pinging him might shed some light on it. At the very least, he'd be able to whip some crazy manual grid solution out of his back pocket.
 

« first day (209 days earlier)      last day (3602 days later) »