Displaying 20 results from an estimated 10000 matches similar to: "as.character.factor and S4 object containing factor"
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]]
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_
2002 Oct 29
1
pretty not pretty
Hi,
I have a following vector:
> smallch
[1] 0.0652840 0.1181300 0.0319370 0.0155700 0.0464110 0.0107850
[7] 0.0158970 0.0375900 0.0603090 0.0310300 0.0105920 0.0540580
[13] -0.0177740 0.0039393
Pretty (R 1.5.1) has problems with zero:
> pretty(smallch)
[1] -2.000000e-02 -3.469447e-18 2.000000e-02 4.000000e-02 6.000000e-02
[6] 8.000000e-02 1.000000e-01 1.200000e-01
2002 Oct 29
1
pretty not pretty
Hi,
I have a following vector:
> smallch
[1] 0.0652840 0.1181300 0.0319370 0.0155700 0.0464110 0.0107850
[7] 0.0158970 0.0375900 0.0603090 0.0310300 0.0105920 0.0540580
[13] -0.0177740 0.0039393
Pretty (R 1.5.1) has problems with zero:
> pretty(smallch)
[1] -2.000000e-02 -3.469447e-18 2.000000e-02 4.000000e-02 6.000000e-02
[6] 8.000000e-02 1.000000e-01 1.200000e-01
2002 Aug 28
1
dev.print + impossible filename -> break (PR#1959)
Full_Name: Ott Toomet
Version: 1.5.1
OS: Linux (RH 7.1)
Submission from: (NULL) (192.38.43.138)
Hi,
Try to give an impossible file name (command to pipe through) for dev.print:
> plot(1:4)
> dev.print(file="|llllll")
I got the response
sh: llllll: command not found
Process R broken pipe at Wed Aug 28 14:42:27 2002
After which R was killed (or at least vanished from the
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
2023 Aug 06
1
hist(..., log="y")
hist() is designed so that the total area sums to 1. You should build you desired behavior using a barchart.
?
David
Sent from my iPhone
> On Aug 5, 2023, at 11:50 PM, Ott Toomet <otoomet at gmail.com> wrote:
>
> ?Sorry if this topic has been discussed earlier.
>
> Currently, hist(..., log="y") fails with
>
>> hist(rexp(1000, 1), log="y")
2004 Jun 08
3
make fails with utf-8 locale, RH9 (PR#6958)
Hi,
I have an RH9 box (gcc (GCC) 3.2.2, perl 5.8.0, make 3.79.1). My
locale is
LANG="et_EE.UTF-8"
I do:
$ ./configure --prefix=/usr/local
...
$ make
...
make[4]: Entering directory `/home/otoomet/a/R-1.9.0/src/library/stats4'
dumping R code in package 'stats4'
Error in structure(c(unlist(lapply(list(...), unclass))), class = c("POSIXt", :
couldn't
2003 Jun 06
3
writing comments within a function
Hi R lovers!
I would like to know how you can write comments inside the code of a
function
is it latex style
% ?
or any other language style?
thanks a lot
*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute
2003 Mar 21
1
barplot legend size
Dear R-people,
are there any way to change the size of legend in barplot? I have
tried various versions of cex, both as par(cex.*= ) and barplot(...,
cex.*= ). So long without success.
Sincerely,
Ott
> version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 1
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
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
2003 Feb 21
1
question about XML (package)
Hi,
I have a problem with spacing in XML files when reading them with
xmlTreeParse. I don't know the exact specification of xml but
according what I have red before it should work.
consider a tiny test.xml file:
<?xml version="1.0"?>
<fields>
<v1>1 </v1>
<v2> 2 </v2>
<v3> 3</v3>
</fields>
i.e. I have three fields v1, v2 and
2015 Sep 26
3
issues with dev.new avoiding RStudio plot device on unix?
Sorry, should have given more background. x11 works fine on all my
systems when called by x11(). I'm the maintainer of a package that uses
the animation library, which has performance issues when used with the
RStudio plot device. But if you call plot.new() when using RStudio, you
get an RStudio device, not the standard device for the platform because
it overrides the device option.
2005 Aug 25
1
how to close connections?
Hi everybody,
I am using gzipped files quite extensively and cannot figure out how I
can close (or reuse) connections.
Example:
> for(i in 1:300) {cat(i, "\n"); a <- readLines(gzfile("file.gz"), n=1) }
1
2
...
46
47
Error in gzfile("~/tyyq/andmebaasiq/ETU/ETU1997.tsv.gz") :
all connections are in use
To use just gzfile without any open/close should
2006 Jul 02
1
workaround for numeric problems
Dear R-people,
I have to compute
C - -(pnorm(B)*dnorm(B)*B + dnorm(B)^2)/pnorm(B)^2
This expression seems to be converging to -1 if B approaches to -Inf
(although I am unable to prove it). R has no problems until B equals
around -28 or less, where both numerator and denominator go to 0 and
you get NaN. A simple workaround I did was
C <- ifelse(B > -25,
-(pnorm(B)*dnorm(B)*B
2002 Mar 02
1
accessing factor levels from C
Hi,
I am trying to get information about factors from a C-program. As I see,
the factors are basically integers with attribute ,,levels''. But
unfortunately I am not been able to read the levels information. I am
using:
SEXP variable, levels;
...
variable = VECTOR_ELT( data_frame, j);
switch( TYPEOF( variable)) {
case INTSXP:
if( isFactor( VECTOR_ELT( data_frame,
2023 Aug 06
2
hist(..., log="y")
Sorry if this topic has been discussed earlier.
Currently, hist(..., log="y") fails with
> hist(rexp(1000, 1), log="y")
Warning messages:
1: In plot.window(xlim, ylim, "", ...) :
nonfinite axis=2 limits [GScale(-inf,2.59218,..); log=TRUE] -- corrected
now
2: In title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) :
"log" is not a graphical
2000 Oct 24
2
multinominal probit & logit
Dear everybody!
Are there algorithms for multinominal logit/probit available for R? Is it my
fault that I cannot find these in CRAN? Has somebody programmed these?
with best wishes
Ott Toomet
Ott.Toomet at mail.ee
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2005 Apr 20
2
heckit / tobit estimation
Dear All,
we (Ott Toomet and I) would like to add functions for maximum likelihood (ML)
estimations of generalized tobit models of type 2 and type 5 (*see below) in
my R package for microeconomic analysis "micEcon". So far we have called
these functions "tobit2( )" and "tobit5( )".
Are these classifications well known? How are these functions called in other