search for: hirschorn

Displaying 7 results from an estimated 7 matches for "hirschorn".

2016 Apr 08
0
Is this a bug in quantmod::OpCl?
On Fri, Apr 8, 2016 at 10:51 AM, James Hirschorn <james.hirschorn at hotmail.com> wrote: > > > On 04/06/2016 07:58 PM, Joshua Ulrich wrote: >> >> On Tue, Apr 5, 2016 at 9:17 PM, James Hirschorn >> <james.hirschorn at hotmail.com> wrote: >>> >>> OpCl works on xts objects but not on quantmod....
2010 Oct 24
3
Long model formulae
What is a good way to enter a very long model formula. For example: y ~ Input.2 + Input.3 + ... + Input.1000 (assuming the corresponding dataframe has many other columns). Is there a way to convert a character string to a formula? Are there command line expansions in R besides the simple '.'? Thanks. [[alternative HTML version deleted]]
2010 Oct 31
3
extracting named vector from dataframe
Suppose df is a dataframe with one named row of numeric observations. I want to coerce df into a named vector. as.vector does not work as I expected: as.vector(df) returns the original dataframe, while as.vector(df,mode="numeric") returns an unnamed vector of NAs. This works: > v <- as.numeric(as.matrix(df)); names(v) <- names(df); I just wanted check if there
2010 Oct 04
3
read columns of quoted numbers as factors
Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as "1", "2", "3", etc ... The default behavior of read.table is to convert these columns to integer vectors. Is there a way to get read.table to recognize that columns of quoted numbers represent factors (while unquoted numbers are interpreted as
2016 Apr 06
2
Is this a bug in quantmod::OpCl?
OpCl works on xts objects but not on quantmod.OHLC objects. Is this a bug? Example error: x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 9, 14) - 1 set.seed(1) x <- zoo(matrix(runif(20, 0, 1), nrow=5, ncol=4), x.Date) q <- as.quantmod.OHLC(x,c("Open","High","Low","Close")) # error OpCl(q) #> Error in `colnames<-`(`*tmp*`, value =
2016 Apr 08
0
Is this a bug in quantmod::OpCl?
On 04/06/2016 07:58 PM, Joshua Ulrich wrote: > On Tue, Apr 5, 2016 at 9:17 PM, James Hirschorn > <james.hirschorn at hotmail.com> wrote: >> OpCl works on xts objects but not on quantmod.OHLC objects. Is this a bug? >> > Thanks for the minimal, reproducible example. > > Looks like a bug. There's no as.quantmod.OHLC.xts method, so the zoo > method is dispa...
2010 Nov 15
2
Extracting from data.frame
Can someone please explain the following behavior? df1 and df2 are data.frames. Suppose I want a subset of the rows (observations) using extraction, say just the first row. What I want to know is why if df1 has just one column then df1[1,] returns a vector, whereas if df2 has 2 or more columns then df2[1,] returns a data frame? Why is the single column case different? [[alternative HTML