similar to: N'th of month working day problem

Displaying 20 results from an estimated 100 matches similar to: "N'th of month working day problem"

2010 Aug 21
1
Help Choosing Start Values for nls
Hi all, I'm trying to do a simple curve fit and coming up with some interesting results I would like to get comment on. So as shown below, tsR is my explanatory and response is... well... my response. This same data in gnumeric gets fitted with the curve "response=10078.4 + 1358.67 * ln (explanatory - 2009.07) So I'm using nls with the start values supplied by gnumeric. in
2011 Jan 12
1
snowfall
Hello, Just wondering why I am unable to run this in parallel. A dput of my dataset is attached at the end. Please use to create my data object. I want to run this function in parallel (not sure if this is an efficient implementation): #Function to calculate the time to maturity for the option require(fCalendar,quietly=TRUE) #Trying to calculate the trading days
2006 Jul 23
1
Iterated Data Input/Output with Random Forests
Hi, I am currently writing code to input a few thousand files, run them through the Random Forests package, and then output corresponding results. When I use the code below: zz<-textConnection("ex.lm.out", "w") sink(zz)
2017 Sep 06
1
Using quantmod to obtain current Dow Jones index
R 3.4.1 OS X Colleagues, I am just learning to use the quantmod package and I have encountered something that I don?t understand. This works: getSymbols("^DJI") This does not work: getQuote("^DJI?) It returns only NAs: Trade Time Last Change % Change Open High Low Volume ^DJI <NA> N/A N/A N/A N/A N/A N/A N/A Two questions: 1. Is there some way to obtain the
2009 Apr 28
1
Problem with Random Forest predict
I am trying to run a partialPlot with Random Forest (as I have done many times before). First I run my forest... Cell is a 6 level factor that is the dependent variable - all other variables are predictors, most of these are factors as well. predCell<-randomForest(x=tempdata[-match("Cell",names(tempdata))],y=tempdata$Cell,importance=T) Then I try my partial plot to look at the
2010 Mar 24
1
flexible alternative to subsetting dataframe inside nested loops
I have a dataFrame variable: L1 L2 L3 ... v1 v2 ... 1 2 3 4 ... I want to process subsets of it as defined by combinations of L1-L2-L3. I do it successfully using nested loops: for (i in valuesOfL1 { for (j in valuesOfL2) { for (k in valuesOfL3) { tempData <- subset(dataFrame, (L1 == i & L2 == j & L3 == k, select=c(v1,v2) )) if
2006 Jun 03
1
warnings messages from R when returning nothing
Hi : I have old Splus code that I am trying to turn into R ( I am using windows Xp and R 2.20 ) and I am getting a warning from one of my statements because the behavior of R is different from Splus. below, tempdata is a matrix of numbers and I have the following command which basically runs through the columns and returns the minimum index of the column where an NA occurs.
2006 Jul 05
2
apologes if you already saw this :efficiency question
hi everyone : i'm not sure if my previous mail about this got sent. i was typing and erroneosuyl hit a button and lost what i was typing. anyway, i have the code below ( it works ) in which i run through the rows of a dataframe, taking out the first two fields which are characters strings ( with some extra spacing so i yuse gsub) and appending these character strings to a list so that i can
2012 Dec 20
2
Filling Lists or Arrays of variable dimensions
Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){ l[[h]][[w]] <- doSomething() } } Now those parameters aren't
2012 Jul 22
2
Frame Column to List (conversion)
Hi, Input Format: excel file (XLS) Column 1: Gene ID (alphanumeric) Column 2 - 10 : (numeric data). inData = read.xls ( <fileName>) geneLabel = inData [ , 1] - column 1 stored in geneLabel tempData = inData [ , 2: 10] expValues = data.matrix (tempData) - convert frame into Matrix format expValues has the matrix format needed for analysis. I need to bind gene labels as . I
2004 Dec 12
1
Re: [R-sig-finance] dates and times on Windows for fMetrics
# Here is the solution: require(fBasics) # Be sure that R is running in time zone GMT. # Set your Windows environment variable to "GMT" # Your PC Windows clock can still run in any other time zone! # My clock is now running in Zurich in Europe. Date = c("2003-10-09", "2003-10-10", "2003-10-13", "2003-10-14") Open = c(1.27, 1.25, 1.27,
2018 Jan 31
0
MICE data analysis with glmulti
Dear All, wonder if you have some thoughts on running the with() function (and perhaps including the pool() function to get the results?) in glmulti? In other words, how to run glmulti with a data set that is produced by mice()? publicly available code: data <- airquality data[4:10,3] <- rep(NA,7) data[1:5,4] <- NA data <- data[-c(5,6)] library(mice) library(glmulti) the following
2011 Aug 03
4
Convert matrix to numeric
I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433",
2008 Feb 25
1
Problems with augPlot and for loops
Dear all, I'm a new R user and I find myself in trouble with some of the plot functions. I'm trying to save a sequence of plots to eps files using a for loop, but I get only empty figures. In each iteration of the for loop I fit a nlme model and I'd like to plot its prediction of the dependent variable values. This is the code I'm using to plot the figures (I removed the commands I
2007 Oct 10
0
encode return 0
Hi. I?m trying to use the speex library in c#, everything seems to works right, when I call the speex_encode_int function it always return 0, any help would be appreciated. Here?s the sequence of calls: //Initialization _Mode = speex_lib_get_mode(0); _State = speex_encoder_init(_Mode); fixed (int* __FrameSize = &_FrameSize, __Complexity =
2007 May 31
0
loading several "samples" of data from hard-drive, run "lm", "rlm", etc, save results in a list
I have many "sample" datasets (e.g. sample 5, sample 6, etc), each identified by a number as a suffix. These datasets are saved as individual R objects on my hard drive. (e.g."Wind.5.r" . "Wind.6.r","Solar.5.r","Solar.6.r") For example purposes, I have written code that creates similar data files using the "airquality" dataset. (see
2018 May 03
4
length of `...`
On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote: > In R-3.5.0 you can use ...length(): > > f <- function(..., n) ...length() > > f(stop("one"), stop("two"), stop("three"), n=7) > [1] 3 > > Prior to that substitute() is the way to go > > g <- function(..., n) length(substitute(...())) > >
2005 May 20
3
Reading Numeric Data -- Trivial Question
Hello, I am very new to R, and this is certainly and uber-newby question: I am trying to read a vector of numeric data that contains the log of daily DJI returns and simply plot a histogram of it. The data I have is in a text file format, on each line a number represents the log of the returns of one day. I have problems in reading this in a vector numeric format. If I try
2011 May 15
4
DCC-GARCH model
Hello, I have a few questions concerning the DCC-GARCH model and its programming in R. So here is what I want to do: I take quotes of two indices - S&P500 and DJ. And the aim is to estimate coefficients of the DCC-GARCH model for them. This is how I do it: library(tseries) p1 = get.hist.quote(instrument = "^gspc",start = "2005-01-07",end =
2010 Jun 05
1
How to get the closing price from the the GOOGLE FINANCE site for NSEINDIA stocks
Sir, How to get the closing price from this link http://www.google.com/finance/historical?q=NSE:RCOM I installed quantmod getSymbols('NSE:RCOM',src='google') gives me this error********************** Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : cannot open URL