Displaying 20 results from an estimated 30000 matches similar to: "indexing an array"
2007 Oct 30
2
Splitting up the micEcon package?
Dear R Users:
The functions of our "micEcon" package [1,2] can be subdivided into three
categories:
- microeconomic demand and firm models
- sample selection models (mainly selection())
- routines for (likelihood) maximisation (e.g. maxLik(), maxNR(), maxBHHH())
(mainly used for ML estimation of sample selection models)
Although sample selection models are often used in
2002 Aug 10
2
package for saving large datasets in ASCII
Hi,
I have made a tiny package for saving dataframes in ASCII format. The
package contains functions save.table() and save.delim(), the first
mimics (not completely) write.table() and the second uses just
different default values, suitable for read.delim().
The reason I have written the functions is that I have had problems
with saving large dataframes in ASCII form. write.table() essentially
2007 Oct 17
1
R CMD build and et_EE.UTF-8 locale -> invalid files (PR#10351)
Full_Name: Ott Toomet
Version: 2.6.0, 2.5.x
OS: debian etch, lenny
Submission from: (NULL) (80.235.63.243)
When building a package with 'R CMD build name_of_directory" using "et_EE.UTF-8"
locale, I get the following:
siim at tancredi:~/tyyq/econ/micEcon$ R CMD build trunk
* checking for file 'trunk/DESCRIPTION' ... OK
* preparing 'trunk':
* checking
2002 May 13
3
Histograms rotated, side-by-side
Hi there,
I am wanting to create 8 side-by-side histograms which have been rotated 90
degrees clockwise from how they usually sit.. all with the same scales. Is
someone able to help me out?
Thanks so much,
Rachel Cunliffe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2002 Jan 25
2
problem with read.table -- example
Hi,
I have not get much response for my question about read.table for couple of
days ago. As I said, the problem is that read.delim() do not want to read
more than 51 lines of data, with longer file it reads the first column as
row names, although I have not noticed any special binary symbols around
line 51 either. This problem seems to happen with this particular file, I
could easily read in a
2002 Jun 20
2
cat output To data.frame.rows ?
Hi,
is there a possibilty to get my function output with "cat "
as data.frame.rows with variables ?
Var1---------------- 8 15 1 3
Var2---------------- 0.170 0.319 0.0213 0.0638
Var3---------------- 83.8 88.6 90 75
Var4---------------- 84.3 84.3 100 83.3
Var5---------------- 62.5 56 20 53.3
function(data.frame) {
....
....
2001 Oct 09
1
bug in paste?
Dear all,
I have strange problems with paste. Actually I suggest it is a bug (I
send a associated bug report for some days ago too).
I have a vector ce0, a character vector m and I paste them together:
> ce0
[1] "1985" "9" "2" "2" "1" "A" "1" "" "NA" "5"
[11]
2002 Sep 09
2
lapply-related question
Dear R-gurus,
I would like to use a lapply on a kind of "bivariate" problem. I have
a vector and a list, components of which are vectors, e.g.
vec <- c(1,2,3)
lst <- list(1, c(2,3), c(4,5,6))
I want to apply a function to each component of the list, using the
corresponding component of the vector as a parameter. E.g. I want a
list in the form
list(lst[[1]] + vec[1], lst[[2]]
2010 May 10
2
Robust SE & Heteroskedasticity-consistent estimation
Hi,
I'm using maxlik with functions specified (L, his gradient & hessian).
Now I would like determine some robust standard errors of my estimators.
So I 'm try to use vcovHC, or hccm or robcov for example
but in use one of them with my result of maxlik, I've a the following
error message :
Erreur dans terms.default(object) : no terms component
Is there some attributes
2006 Sep 18
1
ISO8601 week-of-year to date
Hi,
are there any way to convert ISO8601 weeks to gregorian dates? Something
like
coverttodate(year=2006, week=38, day=1)
# Sept 18, 2006
Thanks in advance,
Ott
2007 Feb 10
1
how to eval subset?
Hi,
I have problems with subset when calling a function from inside a function
from inside a function. Here is a small example to be called as 'f1()'.
'eval()' in f3 fails with error message
Error in eval(expr, envir, enclos) : object "subs" not found
Is it possible to supplement subset to data, to be calculated in a
different environment than the data itself?
Thanks
2005 Aug 31
5
"best" c++ matrix library?
Hi folks,
I am planning to write some more time-consuming matrix manipulations
in c++. What is the experience with the existing c++ matrix
libraries? Do you have some recommendations? Are some libraries more
compatible with R than the others?
All suggestions welcome!
Best,
Ott
2002 Dec 09
2
Sth better than cycle?
Hi,
I want to calculate expected likelihood over a 2D discrete
distribution, something like
\sum_k \sum_l p_{kl} L(v_k, v_l)
It is trivial to write a cycle like
for(k in 1:K)
for(l in 1:L)
sum <- sum + p[k,l]*L(v[k], v[l])
But is there a more clever way for R?
Best wishes,
Ott
2003 Aug 26
3
plot empirical pdf
Hi,
are there any function to plot the empirical probability distribution
function? I just don't want to reinvent the wheel...
Best wishes,
Ott
--
Ott Toomet
PhD Student
Dept. of Economics
?rhus University
Building 322
Universitetsparken
8000 ?rhus C
Denmark
otoomet (a) econ au dk
ph: (+45) 89 42 20 27
-------------------------------------------
(o_ (*_ (O_
2005 Dec 20
4
help with sapply, plot, lines
Hi,
I am trying to plot multiple lines on a graph.
The function is particularly simple:
sigma<-function(lambda) atm-2*rr*(lambda-0.5)+16*str*(lambda-0.5)^2
which uses the variables atm, rr and str...
I define these as such:
atm<-0.4
rr<-0.2
str<-0.1
and this plots fine:
plot(seq(0.01,0.99,0.01),sigma(seq(0.01,0.99,0.01)),ylim=c(0,1))
Now, I want to plot the same function for
2007 Sep 09
2
What does it mean by "initial value not available"?
Dear friends.
I use ConstrOptim( ) and got error message "initial value not available".
My understanding of "initial value not available" is that one of the
following 3 cases happens:
1.The objective function is not well defined at the point of the initial
value.
2. The differentiation of the objective function is not well defined at the
point of the initial value.
3. The
2015 Aug 21
1
sequence divided by data.frame
Can anyone explain me the following behavior:
> 1:2/1
[1] 1 2
-- makes sense
> 1:2/matrix(1,1,1)
[1] 1 2
-- makes sense
> 1:2/data.frame(a=1)
a
1 1
-- why is this different?
Best,
Ott
--
Ott Toomet
Visiting Researcher
School of Information
Mary Gates Hall, Suite 095
University of Washington
Seattle, WA 98195
[[alternative HTML version deleted]]
2016 Sep 22
1
as.character.factor and S4 object containing factor
Do I mess up something or is this a bug? If I define an S4 object
that contains "factor", all the tests indicate that it is a factor but
as.character.factor() complains of it being a non-factor...
> setClass("Foo", contains="factor")
> a <- new("Foo", factor(1:3))
> a
Object of class "Foo"
[1] 1 2 3
Levels: 1 2 3
> class(a)
[1]
2004 Jan 13
2
R killed on Solaris
Hello,
I am running a preliminary data-processing job on solaris. Basically,
the program reads a large number of ascii-lines (about 1M) by blocks
(size 25000 lines), selects suitable observations (around 5000) and
writes the results into a dataframe for latter processing.
The problem is that when I run the job interactively (in emacs/ESS),
everything works fine. If I try to run it from shell
2015 Sep 25
2
issues with dev.new avoiding RStudio plot device on unix?
Hi R-devl,
I'm still unable to force opening an *interactive* non-Rstudio
platform-specific plot device on *unix* systems.
dev.new() add a new argument 'noRStudioGD' in R 3.1.1. Thank you. It
works for me when using RStudio on Windows, but on the unix system it
opens a pdf device instead of an interactive device when using an
interactive RStudio session (with R_DEFAULT_DEVICE