[R] How to integrate OpenBLAS LAPACK to my RStudio in WINDOWS 7?

2017-04-15 Thread Allan Tanaka via R-help
Hi. I have installed OpenBLAS and LAPACK. It's working correctly in Python. I also want OpenBLAS and LAPACK to be used in R to speed up computational time but i can't find the installation guide for RStudio in Windows7. Does it mean that RStudio automatically detect the installed OpenBLAS and us

[R] argument to 'which' is not logical

2017-03-22 Thread Allan Tanaka
I'm trying to run the code: inds<-which(c != 0 ), but it gave me error: Error in base::which(x, arr.ind, useNames, ...) :   argument to 'which' is not logical Here is code: alphas <- seq(0, 1, by=.002)mses <- numeric(501)mins <- numeric(501)maxes <- numeric(501)for(i in 1:501){  cvfits <- cv.glmn

Re: [R] HELP ME: Fill NA Values from the previous Non-NA Values

2017-03-16 Thread Allan Tanaka
E)) > dat   ie          iw 1  a  1.07254438 2  a  0.53067188 3  a  0.53067188 4  b -0.09767088 5  b -0.09767088 6  b -1.02719060 7  c  2.35787246 8  c -0.07513048 9  c -0.17164728 > Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Beha

[R] Error in roc.default(response, predictor, auc = TRUE, ...) : No valid data provided.

2017-03-16 Thread Allan Tanaka
Check my fitted dimension:str(predict(mod, Test1))   Named num [1:2131] 402 2346 1995 2205 2895 ... - attr(*, "names")= chr [1:2131] "1" "2" "4" "6" ... So i want to see AUC score for my model being applied into Test1data after having splitting total data (Train) into Train 1 and Test 1, but i g

Re: [R] HELP ME: Fill NA Values from the previous Non-NA Values

2017-03-16 Thread Allan Tanaka
t;Small","Medium",NA,"Large",NA,NA,NA,"Small"))) [1]   Small  Medium Medium Large  Large  Large  Large  Small Levels: Large Medium Small > locf2(c(12, NA, 10, 11, NA, NA)) [1] 12 12 10 11 11 11 Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Mar 15, 2017

[R] HELP ME: Fill NA Values from the previous Non-NA Values

2017-03-15 Thread Allan Tanaka
The following is an example: | Item_Identifier | Item_Weight | | FDP10 | 19 | | FDP10 | | | DRI11 | 8.26 | | DRI11 | | | FDW12 | 8.315 | | FDW12 | | The following is the one that i want to be. That is, filling NA values from the previous Non-NA values. | Item_Identifier | Item_Weight | | FDP

[R] HTTP status was '404 Not Found'

2017-03-07 Thread Allan Tanaka
HiSo I tried running the p but i'm stuck as i get the following error:  In download.file(url, destfile, method = method, quiet = quiet) :  cannot open URL 'http://chart.yahoo.com/table.csv?s=DJI&a=2&b=13&c=2012&d=2&e=07&f=2017&g=d&q=q&y=0&z=DJI&x=.csv': HTTP status was '404 Not Found' Here is t

[R] Error in curve 'expr' did not evaluate to an object of length 'n'

2017-03-05 Thread Allan Tanaka
Please help. I try to re-produce R-script by plotting a set of functionWhen i running code: plot(Vectorize(running.acf.max))it gets the error message like this: Error in curve(expr = x, from = from, to = to, xlim = xlim, ylab = ylab,   :   'expr' did not evaluate to an object of length 'n' Even t

[R] Error in model.frame.default(formula = formula, data = data, drop.unused.levels = TRUE, : object is not a matrix

2017-03-01 Thread Allan Tanaka
Hi,  I have encountered the following error, when running 'depmix' function, which I think  has something to do with my data, and I cannot understand why, even though i have converted my data into as.matrix() See attached file  library(depmixS4) library(TTR) library(ggplot2) library(reshape2) dat

Re: [R] order.by requires an appropriate time-based object

2017-02-27 Thread Allan Tanaka
Jesus!! even a small mistake like that can make me a headache.Thanks, this works like charm :) :) On Tuesday, 28 February 2017, 4:12, Joshua Ulrich wrote: On Sun, Feb 26, 2017 at 11:37 PM, Allan Tanaka wrote: > Here is the screenshoot to show what's happening entirely &g

[R] order.by requires an appropriate time-based object

2017-02-26 Thread Allan Tanaka
HiNot sure why i get error like this: Error in xts(forecasts, dates[(window.length):length(returns)]) :   order.by requires an appropriate time-based object I have researched for the answer that i need to convert returns into time series. I did that but still it doesn't work?See attached for fil

Re: [R] unidentified option(s) in mean.model

2017-02-25 Thread Allan Tanaka
Let me know if anything On Saturday, 25 February 2017, 23:18, Allan Tanaka wrote: Hi See attached txt On Saturday, 18 February 2017, 20:47, Rui Barradas wrote: Helo, No attachment came through. Change the file extension from .R to .txt and resend, there aren't many

Re: [R] unidentified option(s) in mean.model

2017-02-25 Thread Allan Tanaka
Hi See attached txt On Saturday, 18 February 2017, 20:47, Rui Barradas wrote: Helo, No attachment came through. Change the file extension from .R to .txt and resend, there aren't many types of files r-help accepts. Rui Barradas Em 17-02-2017 17:20, Allan Tanaka escreveu: &

[R] unidentified option(s) in mean.model

2017-02-17 Thread Allan Tanaka
So i tried brute force to find best fitted GARCH model for prediction.The code works fine as it runs but at the end of processing, there's error like this: There were 50 or more warnings (use warnings() to see the first 50). So i type warnings(), then the error become:unidentified option(s) in m

Re: [R] [Python] NameError: name 'hurst' is not defined

2017-02-13 Thread Allan Tanaka
Correction, it should look like this:**def hurst(ts): lags = range(2, 100) tau = [np.sqrt(std(subtract(ts[lag:], ts[:-lag]))) for lag in lags] poly = np.polyfit(log(lags), log(tau), 1) return poly[0]*2.0 On Tuesday, 14 February 2017, 0:06, Allan Tanaka wrote: Hi. Not sure why this

[R] [Python] NameError: name 'hurst' is not defined

2017-02-13 Thread Allan Tanaka
Hi. Not sure why this code produces the error like this. This error appears when i run the code of print "Hurst(GBM):   %s" % hurst(gbm):  Traceback (most recent call last):  File "", line 1, in     print "Hurst(GBM):   %s" % hurst(gbm)NameError: name 'hurst' is not defined Here is the full code

Re: [R] object of type 'closure' is not subsettable

2017-02-13 Thread Allan Tanaka
code snippet in the error message says '[[d+1]]' but the code you supplied has '[d+1]'.  Does the html mangling selectively double brackets or did you not show us the code that generated that message? Bill Dunlap TIBCO Software wdunlap tibco.com On Sun, Feb 12, 2017 at 4:34 A

[R] object of type 'closure' is not subsettable

2017-02-12 Thread Allan Tanaka
Hi. I tried to run this R-code but still completely no idea why it still gives error message: Error in forecast[[d + 1]] = paste(index(lEJReturnsOffset[windowLength]),  : object of type 'closure' is not subsettable Here is the R-code: library(rugarch); library(sos); library(forecast);library(la