Displaying 20 results from an estimated 2000 matches similar to: "Plot 3d"
2003 Sep 19
3
Locate first index
Hi, all. I'd like to know if exists a manner to get the first index where
a condition is attained in a vector. For example,
There is a better solution than
first.index <- table(subject[corretor==27])[1]
(give me the subject for the first time that corretor is 27)?
Thanks,
========================================
Cezar Freitas (ICQ 109128967)
IMECC - UNICAMP
Campinas, SP - Brasil
2003 Aug 06
2
evaluating and walking in names
Hi, all.
Suppose I have an object with names (like a data.frame) and I want to walk
in a loop with your names. How can I do this? The idea is like this:
my.data<-data.frame(matrix(runif(6),ncol=2))
names(my.data)
[1] "X1" "X2"
for(i in names(my.data)){
my.variable <- cat(paste("my.data$", i, "\n", sep=""))
print(mean(my.variable))
}
#it
2004 Jun 20
1
hidden markov models in R?
Hi, friends!
Has R estimation (library, for example) to do estimation in HMM?
Thanks in advance,
========================================
Cezar Freitas
Estatistico - Comissao Permanente para os Vestibulares / UNICAMP
Probabilidade e Estatistica Aplicadas - IME / USP | IMECC / UNICAMP
Campinas | Sao Paulo, SP - Brasil
2009 Dec 03
2
adding bmp/jpg/gif to an existing plot
Hi, all.
I searched a lot at mailing list, installed EBImage and gtk packages, but I
couldn't make this simple work:
How to add a image file (jpg or bmp ou gif) to an existing plot window (not
plot over the image), like the code below (pseudo function add.image):
plot(1:10,1:10,main="test")
image = read.X("myimage.jpg")
add.image(image, x.left=2, y.bottom=4,
2009 Jun 26
5
(performance) time in Windows vs Linux
Hi, all.
I began to migrate my R codes from Windows to Linux and surprised me
with an old question. I simplified the problem and made a little test to compare times at same
computer and the Linux time is worse (not so little) than Windows time:
28 vs 53 seconds.
I make an example (below) to facilitate all to see the difference.
I also build from source (it's my first time) a version of R to
2002 Mar 19
3
Re: Problems with rgl package
I also downloaded the rgl package (after reading recent Uwe Ligges' post)
and installed in on my Win2k Pro sp2 machine. It seems to work with no
problems. I ran most of the examples, including the hist3d one, and all of
them worked fine.
A couple of thoughts. I have administrative priviliges on my machine.
Could this possible make a difference. The rgl library uses OpenGL. Is it
a
2000 Nov 01
3
triangular matrix
How I make the below matrix
| a^0 0 0 ... 0 |
| a^1 a^0 0 ... 0 |
| a^2 a^1 a^0 ... 0 |
| . |
| . |
| . |
| a^n a^(n-1) a^(n-2) ... a^0 |
with no loops, where "a" is a constant?
========================================================================
C?zar de Freitas
Depto. de Estat?stica - UFPE
Recife - Pernambuco - Brasil
2006 Apr 19
1
apply(table) miss factor structure
Hi, all.
I didn't find something similar to this problem in
past list.
I have a data frame (named restr) where some columns
are factors, like you can see:
> table(restr[,"p1"])
0 1 2 3 4 5
0 26 1 0 1 0
> table(restr[,"p2"])
0 1 2 3 4 5 6
0 13 11 1 2 1 0
When I use apply, the factor structure is missed:
>
2002 Sep 29
2
Problem on minima
2005 Feb 17
1
short plots: lwd, margin and postscript behavior
Hi all.
I'm working with a short plot (3x3 inches), but the
results (via postscript command) are not nice. The lwd
command don't affect the lines (that are very large)
and the margins don't change using oma, mai, mar, ...
Below I put an example. Moreover, save the graphics
via postscript command isn't working well (see the
attached ps).
Thanks by the help,
Cezar Freitas.
2008 Oct 01
3
"tapply versus by" in function with more than 1 arguments
Hi. I searched the list and didn't found nothing similar to this. I simplified my example like below:
#I need calculate correlation (for example) between 2 columns classified by a third one at a data.frame, like below:
#number of rows
nr = 10
#the third column is to enforce that I need correlation on two variables only
dataf =
2002 Feb 25
4
replace NAs
Dear R community:
it is possible to replace NA?s in a data frame with zeroes?
what should I do?
Thanks in advance
Juan Pablo
_________________________________________________________________
MSN Photos es la manera m?s sencilla de compartir e imprimir sus fotos:
http://photos.latam.msn.com/Support/WorldWide.aspx
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2002 Mar 29
2
order()
Hi,
In the order() help file, there is an example like:
a <- c(4, 3, 2, NA, 1)
b <- c(4, NA, 2, 7, 1)
z <- cbind(a, b)
(o <- order(a, b)); z[o, ]
How can I do something like "order a in ascending order, b in descending
order"? And say I have a third vector c, and I'd like to add this to the
previous condition "a ascending, b descending, c
2007 Mar 12
3
reading BMP into R
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070312/112cd7f9/attachment.pl
2002 Mar 19
5
matrix with fix number columns but variable number rows
I have to store a number of vectors of the same length. I know the
length but I do not know the number of vectors.
How can I store them as they are created (they are created one by one)?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2002 Mar 20
3
tex/latex output?
Is it possible to write the output/results (redirect) to a latex file?
Jeff.
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
Bus. 541-753-7333
Cell. 541-740-5988
jeff_hamann at hamanndonald.com
www.hamanndonald.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2002 Aug 20
4
plot and bg
Hi all,
I would like to plot some points and define the bg color of my graphics.
But the bg parameter set is defined for the. whole graphic.
In fact, i would like to use something like :
box(bg=gray(0.9)).
So, the background concerns only the plot region and not the main
title, the x title and the y title.
The option col for the function box() concerns the contour and there is
no option
2002 Feb 11
4
Multiple graph pages
Dear R users:
I am a relatively experienced Splus user but new to R, using the version
for Windows 2000.
Splus allows the user to generate multiple graph pages in the graph window.
For example, if you have two plot(...) commands in the script than two
pages in the graph window will be created. However, when I tried this in R,
the second plot will just overwrite the first plot in the graph
2003 Jan 06
1
On nlm
Dear all, I have to minimize a (real) function in a loop (say i in
(1:1000)) and store its ``$estimate'', via
l2estim<-nlm(f.minimo,c(-.01,0.1))$estimate
into a vector for further analisys.
Since the function's behaviour is quite peculiar (in the sense that in
the simulation study it may not have a minumum), sometimes I get the the
warning
Error in nlm(minimo, c(-0.01, 0.1),
2006 Dec 04
4
beginning my R-learning
Hello,
I'm just beginning to learn R. What books/online learning modules with
datasets would you suggest?
Thank you!
Best wishes,
Michael
____________________________________
Michael McCulloch
Pine Street Clinic
Pine Street Foundation
124 Pine Street, San Anselmo, CA 94960-2674
tel 415.407.1357
fax 415.485.1065
email: mm at pinest.org
web: www.pinest.org