Displaying 20 results from an estimated 120 matches for "ajayshah".
2009 Mar 15
1
Stuck on building a package
...to build fine. Today when I tried
to build the package again, some errors popped up. Could you please
help? When I paste the offending function into an R it works
correctly. But the package build breaks.
$ R CMD check ansecon
* checking for working pdflatex ... OK
* using log directory '/Users/ajayshah/L/R/packages/ansecon.Rcheck'
* using R version 2.8.1 (2008-12-22)
* using session charset: ASCII
* checking for file 'ansecon/DESCRIPTION' ... OK
* this is package 'ansecon' version '0.1'
* checking package dependencies ... OK
* checking if this is a source package ... O...
2008 Mar 17
4
How does one do simple string concatenation?
...;a","b","c") and "d" into "abcd"?
> paste(c("a","b","c"), "d")
of course yields
[1] "a d" "b d" "c d"
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2004 Mar 01
6
Find out the day of week for a chron object?
...idays and treat them differently. So I need to run
the day.of.week function. But day.of.week() doesn't eat a chron
object, he insists he wants m,d,y. This seems quite odd. Any idea what
I can do?
Thanks,
-ans.
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2008 Mar 18
3
Puzzled at generating combinations
...r1 R1
r1 R2
r1 R3
r2 R1
r2 R2
r2 R3
r3 R1
r3 R2
r3 R3
How would I go about doing this? I'm sure there's a clean way to do it
but I find myself thinking in loops.
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2006 Mar 06
3
Interleaving elements of two vectors?
...[1], x[2], y[2], x[3], y[3], x[4], y[4], x[5], y[5])
I couldn't think of a clever and general way to write this. I am aware
of gdata::interleave() but it deals with interleaving rows of a data
frame, not elems of vectors.
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2008 Mar 07
4
Reading microsoft .xls format and openoffice OpenDocument files
...ce is
gpl. I hunted a bit and couldn't find any. Does someone know how we
might approach this?
Am I correct in thinking that our goal is reading OpenDocument
files (http://en.wikipedia.org/wiki/OpenDocument) ?
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2006 Jan 22
6
Making a markov transition matrix
...a.frame(prev=fixedup$state.85, new=fixedup$state.86)
)
# This is a bad method because it is hardcoded to the specific values
# of "year".
markov <- table(destination$prev.state, destination$new.state)
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2006 Jan 26
2
Prediction when using orthogonal polynomials in regression
...l to do
prediction for a new set of x points e.g.
xnew <- seq(0,5,.5)
We know that the predicted values should be roughly sin(xnew). What I
don't know is: how do I use the object `d' to make predictions for
xnew?
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2004 May 27
3
Date parsing question
How do I parse a date "yyyymmdd"? I tried asking chron(s, "ymd") but
that didn't work. Would the date parsing routines of the Date class of
1.9 grok this?
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2008 Oct 15
2
"Heuristic optimisation"?
I wondered was people on this list felt about this article:
http://www.voxeu.org/index.php?q=node/2363
which talks about the problems of obtaining sound answers in numerical
optimisation in settings such as MLE or NLS.
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2004 Jul 05
2
Failing on reading a "slightly big" dataset
I have a file with 4 columns per line, all pipe delimited.
$ wc -l cmie_firm_data.text
89325 cmie_firm_data.text
$ ls -al cmie_firm_data.text
-rw-r--r-- 1 ajayshah ajayshah 4415637 Jul 5 15:25 cmie_firm_data.text
$ awk -F\| '(NF != 4)' cmie_firm_data.text
$ head cmie_firm_data.text
All figures are for the year 20030331|||
Company|GVA Less Interest (Rs. thousand)|Interest (Rs. thousand)|GVA (Rs. thousand)
'R' INVEST PVT. LTD.|-510.45|0.18|-...
2004 Jun 21
2
Elementary sapply question
...n 1:3) {
answers[i] = pythagorean(fixed.x, y.values[i])
}
?
I have read the sapply docs, and don't know how to tell him that the
list values that he'll iterate over "fit in" as y.values[i].
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2007 Aug 31
2
Bugreport on integration of Sweave and latex beamer
I think I have isolated a problem with integration between Sweave and beamer.
Could you please see the file:
http://www.mayin.org/ajayshah/tmp/bugdemo.Rnw
Unfortunately, it uses some of my internal libraries, so you can't run
it. When I put it through Sweave, I get:
http://www.mayin.org/ajayshah/tmp/bugdemo.tex
which is, of course, a generic latex file which you can read and run.
When I try to use pdflatex, I get the err...
2004 Feb 19
6
R for economists (was: Almost Ideal Demand System)
Hi,
I did not find any web page about using R in economics and econometrics so
far. However, this does not mean that there is none (searching with google
for "R" and "economics" gives many pages about economics and a name like
Firstname R. Lastname on it ;-)).
Does anybody in the list does know such a web page?
If not, I will be happy if you, Ajay, could build and
2008 Mar 05
1
New data source - now how do we build an R interface?
...d a bit of it and I'm not able to map the resources to
predictable URLs which can then be wget. There's some javascript going
on that I'm not understanding. Perhaps someone on the mailing list can
think about this?
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2009 Oct 17
2
How do I access with the name of a (passed) function
...DOES NOT WORK
sprintf("The %s of x is %.0f\n", s, g(x))
}
f(c(2,3,4), "median")
f(c(2,3,4), "mean")
and get the results
"The median of x is 3"
"The mean of x is 3"
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2004 Jul 05
2
More difficulties in getting data into R
...l2))
[1] 89323
> print(nrow(col4))
[1] 88746
Why might I be getting 89,323 and 88,746 obs for two files which `wc'
believes are each 89,323 lines long?
I checked, and there is no single quote or C-m in either file.
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2005 Aug 19
1
Problem with get.hist.quote() in tseries
...n" "High" "Low" "Close"
- attr(*, "tsp")= num [1:3] 33240 38582 1
- attr(*, "class")= chr [1:2] "mts" "ts"
I wonder what I'm doing wrong.
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2009 Mar 15
1
cbind(NULL,zoo.object)?
...merge.zoo(..., all = all, fill = fill, suffixes = suffixes, retclass = "zoo") :
Index vectors are of different classes: integer Date
Is there an easy workaround; or am I deeply confused; is there a way
out? :-)
--
Ajay Shah http://www.mayin.org/ajayshah
ajayshah at mayin.org http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.
2005 May 08
2
Need a factor level even though there are no observations
...3 3 2
In other words, how do I force education.man to have a factor with 3
levels - "School" "College" "Beyond" - even though there is no
observation in "Beyond".
--
Ajay Shah Consultant
ajayshah at mayin.org Department of Economic Affairs
http://www.mayin.org/ajayshah Ministry of Finance, New Delhi