This worked perfectly, thank you!
On Fri, Feb 27, 2015 at 10:47 AM, Duncan Murdoch
wrote:
> On 27/02/2015 1:18 PM, Brian Trautman wrote:
> > This should be a simple question, but I am at my wits end.
> >
> > dt<-data.table(a=rep(1:10, 26), b=1:260, c=rep(1:2, 130))
This should be a simple question, but I am at my wits end.
dt<-data.table(a=rep(1:10, 26), b=1:260, c=rep(1:2, 130))
sumvar <- 'mysum'
bvar <- 'b'
dt_min <- dt[, list(sumvar = sum(get(bvar))), by=list(a)]
print(dt_min)
I want the function to return two variables, "a" and "mysum". However, it
i
I have two tables that I would like to join together in a way equivalent to
the following SQL. Note that I'm using a "greater than" statement in my
join, rather than checking for equality.
require(sqldf)
require(data.table)
dt <- data.table(num=c(1, 2, 3, 4, 5, 6), char=c('A', 'A', 'A', 'B', 'B
>
> On Feb 10, 2015, at 3:58 PM, Brian Trautman wrote:
>
> > Hi!
> >
> > I'm trying to write a custom function that applies SubStr to a string,
> and
> > then depending on the arguments, converts the output to a number.
> >
> > The substring
Hi!
I'm trying to write a custom function that applies SubStr to a string, and
then depending on the arguments, converts the output to a number.
The substring part of my code works fine, but it's not converting the way I
want to --
options('stringsAsFactors'=FALSE)
require(data.table)
substr_ty
McKown
wrote:
> On Thu, Feb 5, 2015 at 2:08 PM, Brian Trautman
> wrote:
>
>> I'm trying to read some mainframe data encoded as EBCDIC into R, and am at
>> a loss. I'd like to avoid using an external program to convert the files,
>> since I'm operating in
I'm trying to read some mainframe data encoded as EBCDIC into R, and am at
a loss. I'd like to avoid using an external program to convert the files,
since I'm operating in a corporate environment.
You can find the example files at at the link below, with both ASCII and
EBCDIC versions. Note that t
7 matches
Mail list logo