Displaying 20 results from an estimated 100 matches similar to: "efficiency in merging two data frames"
2013 May 31
1
R 3.0.1 : parallel collection triggers "long memory not supported yet"
Dear R developers:
...
7: lapply(seq_len(cores), inner.do)
8: FUN(1:3[[3]], ...)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
Selection: .....................Error in sendMaster(try(lapply(X = S, FUN =
FUN, ...), silent = TRUE)) :
long vectors not supported yet: memory.c:3100
admittedly, my outcome will be a very big list, with 30,000 elements, each
containing data frames
2010 Aug 03
4
mixing strings and numeric doubles in an array
I have an array called "stocks" which contains numeric dates, ticker
symbols,prices, etc.
> stocks[1:3,]
DATE TICKER PERMNO EXCHCD TSYMBOL TRDSTAT SHROUT PRC
RET
1 19950131 EWST 10001 3 EWST A
2224 -7.75000 -0.031250
2 19950228 EWST 10001 3 EWST A
2224 7.54688 -0.026210
3 19950331 EWST
2008 Jun 05
7
Improving data processing efficiency
Hi everyone!
I have a question about data processing efficiency.
My data are as follows: I have a data set on quarterly institutional
ownership of equities; some of them have had recent IPOs, some have not
(I have a binary flag set). The total dataset size is 700k+ rows.
My goal is this: For every quarter since issue for each IPO, I need to
find a "matched" firm in the same
2008 Aug 20
1
How to send Html using SQL Server db mail
All,
I have a variable called `go` and it has a single quote in the name
column of line 47 that I am trying to get rid of. I have tried using
gsub, but I cannot get the syntax correct to tell R to remove the '
(single quote).
> go[47,]
gvkey Symbol Name Rank MarketCap MemoDate
Action Analyst Reason SharesHeld
75 065105 BJ BJ'S WHOLESALE CLUB INC 0.9579
2010 Jan 22
2
sorted reshaping?
dear R wizards:? I am wrestling with reshape.? I have a long data set
that I want to convert into a wide data set, in which rows are firms
and columns are years.
> summary(rin)
firm fyear sim1
Min. :1004.00 Min. :1964.0 Min. : -1.00000
1st Qu.:1010.00 1st Qu.:1979.0 1st Qu.: -0.14334
Median :1016.00 Median :1986.0 Median : 0.00116
Mean
2017 Mar 19
2
outer not applying a constant function
Hi,
the function outer can not apply a constant function as in the last line of the following example:
> xg <- 1:4
> yg <- 1:4
> fxyg <- outer(xg, yg, function(x,y) x*y)
> fconstg <- outer(xg, yg, function(x,y) 1.0)
Error in outer(xg, yg, function(x, y) 1) :
dims [product 16] do not match the length of object [1]
Of course there are simpler ways to construct a constant
2006 May 09
2
devide data into decile
I guess this is really basic. But I do not find an
answer yet. I have a big data.frame. I would like to
divede them into 10 deciles accounding to one of its
member. Then I need a number for each decile with
some computaion within each group. How to devide it?
2008 Mar 25
3
derivatives in R
Hi, I posted this message earlier in "Rmetrics" and I don't know whether I
posted in the wrong place, so I'm posting it again in Rhelp.
I have a function in x and y and let's call it f(x,y). I need to get the
Hessian matrix. i.e I need (d^2f/dx^2), (d^2f/dxdy), (d^2f/dydx),
(d^2f/dy^2).I can get these using the D function. now I need to evaluste the
hessian matrix for
2017 Mar 20
1
outer not applying a constant function
> Or is this a bad idea?
I don't like the proposal. I have seen code like the following (in
fact, I have written such code, where I had forgotten a function was
not vectorized) where the error would have been discovered much later
if outer() didn't catch it.
> outer(1:3, 11:13, sum)
Error in outer(1:3, 11:13, sum) :
dims [product 9] do not match the length of object [1]
2013 Feb 12
0
How do I solve a disk I/O error with RSQLite?
Hi there,
I had an error when using RSQLite. My code and the error message are
the following:
> dbGetQuery(sql.dispersion,
+ "create table monthly_data_temp as
+ select a.*, b.industry
+ from monthly_data as a left join
+ siccd_industry_ff49 as b
+ on a.siccd = b.siccd
+ order by permno, date")
Error
2004 Oct 19
1
[LLVMdev] Re:question about Insert callInst to call a function in library
Thanks Chris, but the method you mentioned is not what I want. Maybe I didn't make it clear.
As you said, /runtime/libprofile is runtime library for the following function.
llvm_start_func_profiling
llvm_start_block_profiling
llvm_start_basic_block_tracing
llvm_trace_basic_block
And those above functions can be inserted into basic block etc for getting profile. However, those
2008 May 02
4
to extract particular date/data
Hi R-expert,
If I have this daily rainfall data, how do call a particular day?
Year,Month,Day,Amount
1900,12,22,1.3
1900,12,23,0
1900,12,24,0
1900,12,25,0
1900,12,26,0
1900,12,27,0
1900,12,28,0
1900,12,29,4.8
1900,12,30,0.3
1900,12,31,0.5
1901,1,1,0
1901,1,2,3
1901,1,3,0
1901,1,4,0.5
1901,1,5,0
1901,1,6,0
...
I used to use julian.date in S-Plus.
Thank you so much for your kind attention and help.
2006 Apr 26
2
program and comment
Hi. I am a newbie to R. I need to do a courses
projects with some manipulation lots of data record
and some back-and-forth linear regression. I do not
want to spend $100 for a SAS lincence, which professor
used. So I decide to start to learn R to finish it.
I am using R in Windows. I feel it is somehow works
like mathemica. I try to write the work into a little
program for future reference.
2012 May 04
2
Can't import this 4GB DATASET
Dear Experienced R Practitioners,
I have 4GB .txt data called "dataset.txt" and have attempted to use *ff,
bigmemory, filehash and sqldf *packages to import it, but have had no
success. The readLines output of this data is:
readLines("dataset.txt",n=20)
[1] " "
2006 May 01
1
How to strip one term from a data.frame? + How to write long line in script?
I need to run a regression with 14 normal variables
and 20 dummy variables. All the data is in a huge
data.frame df. But there is some extra intermediate
item in the same data.frame too. It will be nice I
can strip off those terms and run lm(). Also, is
there a simple way to write the formula, for example,
just specify the y term, all other term in data.frame
should be x_i. Or is there some
2006 May 05
1
weird question about lm() and data.frame
I am still battling with my project :(
I have a line like this
lm(month.model$next.ret~.,month.model,na.action=na.omit)
month.model is a data frame with lots of columns. One
of them is "Oth", a dummy variable. I checked
month.model, there are two rows with number 1 and
others are either 0 or NA. the two rows with Oth==1
have no NA. I have totally about 900 rows. But after
the
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame.
For instance
> ddTable <-
data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry"))
I want a dataset that is
Id Name
1 Paul
2 Bob
> unique(ddTable)
Will give me all 4 rows, and
> unique(ddTable$Id)
Will give me c(1,2), but not accompanied by the name column.
2006 Apr 30
1
general help on R and factor in R and a few simple comment from a newbie
Hi. I am starting to learn R for a course project. I
am relative OK c++ programer. I found the R is very
different. I have read the "an introduction to R". I
have to say it is not very newbie friendly. It does
not explain many things clearly. And unfortunately,
there is not too much introductory materials available
on-line. I do not want to buy a book.
For example, I found
2012 Mar 24
3
Handling 8GB .txt file in R?
Hi,
I am mediocre at R, maybe 1000 hours experience, but I received an 8GB
dataset and I don't know what to do with it. I have to do extensive analysis
over it for my Honours thesis.
I can't even import it. I've tried;
- Splitting it up using the free csv-splitter-1.1.zip that seems to be
working for everyone else (it doesn't work for me, it just outputs 1 single
line).
-
2017 Mar 20
0
outer not applying a constant function
>>>>> Gebhardt, Albrecht <Albrecht.Gebhardt at aau.at>
>>>>> on Sun, 19 Mar 2017 09:14:56 +0000 writes:
> Hi,
> the function outer can not apply a constant function as in the last line of the following example:
>> xg <- 1:4
>> yg <- 1:4
>> fxyg <- outer(xg, yg, function(x,y) x*y)
>> fconstg