similar to: Data table in C

Displaying 20 results from an estimated 1000 matches similar to: "Data table in C"

2006 Nov 21
1
dyn.load
Hi everyone, Now I know there is information on this in the help files - which I have read. I am very close to implementing this but can't quite get how to remove this final hurdle. I have a DLL called "X.DLL" which I have no original code for, just the DLL. I have created a wrapper C file for the calls in X.DLL, and have successfully (I think) created a wrapper DLL for X
2006 Nov 09
2
Retrieving function name
Hi, Does anyone know how I can retrieve a function name, for example If I have a function f as follows: f <- function( myfunc ) { print( name_of(myfunc) ); } I want to know what I should have as "name_of" such that I could call this with : f( median ) and it would print "median" or f( my_function_name ) and it would print "m_function_name". So far all I
2006 Nov 17
1
Manipulating R lists in C
Hi, I have been studying the R manual on lists but cannot seem to create a simple R list in C - I keep on getting "'dimnames' applied to non-array" whenever I attempt to assign names to the list elements: Wanted output a list structure something like [ type="Bid", price=2.0, volume=1000 ] I can get up to a list of [ "Bid2, 2.0, 1000 ] But for the life of
2006 Nov 14
2
String to list and visa versa
Hi, I need to collapse a list into a string and then reparse it back into the list. Normally when I need to do this I simply use write.csv and read.csv, but I need to do this in memory within R rather than writing out to file. Are there any bespoke commands that any knows of that does something like this or any tips for doing this that anyone can suggest? I basically don't care
2006 Jul 02
2
nil.- what the heck...
Okay first off here''s the error: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.- Here''s the code in the model: def highest_bid @bid = nil @oldbid = 0 self.bids.each do |bid| if @bid == nil @bid = bid.max else if bid.max > @bid @oldbid,@bid =
2006 Jul 06
2
@oldbid = 0 why?
Okay I''ve been working on a little biding system. In my model I have class Item < ActiveRecord::Base has_many :bids def highest_bid @bid = 0 self.bids.each do |bid| if @bid == nil @bid = bid.max else if bid.max > @bid @oldbid,@bid = @bid,bid.max end end end if @oldbid == 0 "#{@bid} - #{@oldbid+1} = #{@bid -= @oldbid+1}" else dif =
2010 Oct 04
3
Loop too slow for Bid calc - BUT cannot figure out how to do with matrix
Hi, I am trying to create Bid/Ask for each second from a high volume stock and the only way I have been able to solve this is using loops to create the target matrix from the source tick data matrix. Looping is too slow and not practical to use on multiple stocks. For example: Bids Matrix (a real one is 400,000++ length): Bid Time 10.03 11:05:03.124 10.04 11:05:03.348 10.05
2012 Jul 09
1
Using the effects package
I've been looking into the effects package and it seems to be a great tool for plotting the probabilities of the response variable by the predictors. However, I'm wonder if I can use the effects package to plot the probabilities on the y axis and one predictor on the x axis, with the curve having the info for another predictor. So let's say our response variable is win, a binary
2012 Mar 25
2
Weird POSIXct behaviour
Friends I have an xts that I wish to access. Browse[2]> DATA.ba[[p]]["2012-03-20 00:59:57","bid"] bid 2012-03-20 00:59:57 1.4993 So far so good. Now putting the index into a variable: Browse[2]> Time [1] "2012-03-20 00:59:57 NZDT" Browse[2]> DATA.ba[[p]][Time, "bid"] bid Where has it gone? Looking closer....
2012 Aug 08
1
Calculating percentages across multiple columns
I have the following data and am trying to find the percentage of bid values purchased for that price. So let's say I have a bid of 5 and it's sold 2 times for $3 and $5. Since the original bid was $5, the percentage of times that that bid value results in a sold purchase AT that specific bid level was 1/3 because of the three time where the bid was three, it ended up being sold for $5
2012 Jul 05
2
Plotting the probability curve from a logit model with 10 predictors
I have a logit model with about 10 predictors and I am trying to plot the probability curve for the model. Y=1 = 1 / 1+e^-z where z=B0 + B1X1 + ... + BnXi If the model had only one predictor, I know to do something like below. mod1 = glm(factor(won) ~ as.numeric(bid), data=mydat, family=binomial(link="logit")) all.x <- expand.grid(won=unique(won), bid=unique(bid)) y.hat.new
2006 Nov 21
1
Is there any way to know when a field is blank
I have many text files in the format below and in certain rare instances such as below there can be nothing in one of the fields so a double comma is written but I won't know this because I am reading in many,many files sequentially. # TEXT FILE 2004-02-10 00:01:31.00000,,105.60000000 2004-02-10 00:01:32.00001,,105.60000000 2004-02-10 00:01:45.00000,,105.60000000 2004-02-10
2006 Oct 28
1
update on my weird problem
as jim pointed out ( i think we were figuring this out simultaneously. thanks a lot jim ), it looks it does have something to do with the fact that it's a zoo object because below i consider two cases. in the first case, fxdatab is a zoo object and i get the length of temp to be 1. in the second case, fxdatac is a matrix and the results in temp are correct. gabor : i really hate to bother
2007 Jan 30
4
Speed of for loops
Hi Everyone, I have a question about for loops. If you have something like: f <- function(x) { y <- rep(NA,10); for( i in 1:10 ) { if ( i > 3 ) { if ( is.na(y[i-3]) == FALSE ) { # some calculation F which depends on one or more of the previously generated values in the series y[i] = y[i-1]+x[i]; } else { y[i] <- x[i]; } } } y } e.g. >
2007 Jan 30
4
Speed of for loops
Hi Everyone, I have a question about for loops. If you have something like: f <- function(x) { y <- rep(NA,10); for( i in 1:10 ) { if ( i > 3 ) { if ( is.na(y[i-3]) == FALSE ) { # some calculation F which depends on one or more of the previously generated values in the series y[i] = y[i-1]+x[i]; } else { y[i] <- x[i]; } } } y } e.g. >
2006 Nov 22
1
Ralloc clash
Hi everyone, Have been trying to include windows.h (from MinGW) and R.h into a package and have found that Ralloc is coming up as a clash no matter which include ordering I use. In windows it has 2 arguments and is defined in objidl.h and in R.h it is 3 arguments. Any ideas of how to work round this? Have checked the web and have not seen anyone else comment on this. Many thanks Tom
2017 Dec 01
2
Using Scalar Evolution to Identify Expressions Evolving in terms of Loop induction variables
Hi, I am using Scalar Evolution to extract access expressions (for load and store instructions) in terms of the loop induction variables. I observe that the Scalar Evolution analysis is returning more expressions than I expect - including ones that are not defined in terms of the loop induction variable. For instance in the following code: for(unsigned long int bid = 0; bid < no_of_queries;
2010 Mar 08
2
Data.frame issue (pls help)
Hi: I want to obtain a particular value from a data.frame. Following is my dataframe: > Quotes BID ASK Name CT2 GOVT 99.92969 99.9375 CT2 TUM0 COMDTY 108.53125 108.5469 TUM0 CT5 GOVT 100.10156 100.1094 GT5 FVM0 COMDTY 115.56250 115.5703 FVM0 TYM0 COMDTY 116.93750 116.9531 TYM0 If I try to run: QuoteTUM0BID = Quotes[Quotes$Name %in%
2018 Mar 05
0
Interpret List Label as Date from Quantmod getOptionChain
On 5 March 2018 at 03:13, Sparks, John wrote: | library(quantmod) | #in fairness, I did not include this last time and my example was therefore not reproducible. Apologies to Bert and everyone else #for not following the posting guidelines. | aapl_total<-getOptionChain("AAPL", NULL)> | | How could I then get the subset of the entire list which only has expiry dates in 2019, or
2012 Sep 15
4
how to view only readings of a selected data from a column while the other columns remain
Hi Friends I am new here and have a problem Year Market Winner BID 1 1990 ABC Apple 0.1260 2 1990 ABC Apple 0.1395 3 1990 EFG Pear 0.1350 4 1991 EFG Apple 0.1113 5 1991 EFG Orange 0.1094 For each year and separately for the two