Displaying 20 results from an estimated 55 matches for "ferraz".
2012 Nov 08
4
Accessing selected elements of a list
Hi,
If I have a vector:
junk <- c(2,0,0,3,0)
and want to access, say, all the elements that are greater than zero. I just do:
junk[which(junk>0)]
Now, If I have a list:
jlist <- list(NULL,c(1,0),NULL,c(1,2,3), NULL)
and want to access all the elements that have length greater than zero, I know how to find the elements with:
which(sapply(jlist,length)>0)
But how do I get a
2005 Sep 28
2
Summary of translation status
...the
pt_BR team I wrote a script to summarize the status of the translations.
It wasn't difficult to extend it to the other languages so I decided to
set up a page with the summaries of the translation for all languages
for which currently exist a translation.
http://www.ime.usp.br/~feferraz/en/rtransstat.html
If any of you find it useful I can keep it updated on a regular basis
(daily or weekly).
Thank you,
--
Fernando Henrique Ferraz P. da Rosa
http://www.feferraz.net
2010 Mar 10
2
Using R in a corporate envinronment
...a sound choice in adopting R.
Thanks in advance for your attention,
Fernando Rosa
--
"Though this be randomness, yet there is structure in't."
Rosa, F.H.F.P
Instituto de Matemática e Estatística
Universidade de São Paulo
Fernando Henrique Ferraz P. da Rosa
http://www.feferraz.net
[[alternative HTML version deleted]]
2010 Mar 10
2
Using R in a corporate envinronment
...a sound choice in adopting R.
Thanks in advance for your attention,
Fernando Rosa
--
"Though this be randomness, yet there is structure in't."
Rosa, F.H.F.P
Instituto de Matemática e Estatística
Universidade de São Paulo
Fernando Henrique Ferraz P. da Rosa
http://www.feferraz.net
[[alternative HTML version deleted]]
2007 Aug 17
4
matching elements from two vectors
Hi,
Imagine a vector x with elements (1,2,1,1,3,5,3,3,1) and a vector y with
elements (2,3). I need to find out what elements of x match any of the
elements of y.
Is there a simple command that will return a vector with elements
(F,T,F,F,T,F,T,T,F). Ideally, I would like a solution that works with
dataframe colums as well.
I have tried x==y and it doesn't work.
x==any(y) doesn't work
2003 Mar 29
1
Goodness of fit tests
...g pchisq).
I''ve read a lot of documentation, also tried googling for ''goodness of fit R'' but it was helpless, most of it is only about ''regression analysis''. Does anyone know if there is a simpler way to do this?
Thank you,
<Fernando Henrique Ferraz Pereira da Rosa - mentus at gmx.de>
2003 Mar 10
3
VIM Syntax Highlighting
Has anyone got vim to have syntax highlighting with R function codes? I
know there's something similar that works with emacs (ESS or something like
that), but I was wondering if anyone knew an equivalent that worked with vim.
Thank you,
--
[]'s
mentus at gmx.de
Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage!
2003 Oct 11
2
Problem in 'methods' package (PR#4525)
Full_Name: Fernando Henrique Ferraz Pereira da Rosa
Version: 1.8.0
OS: Linux 2.4.21
Submission from: (NULL) (200.206.211.169)
After installing R 1.8.0, the R DBI interface stopped working. I tracked it
down as a problem in the 'methods' package, that comes in the default
installation.
Somehow the function '.va...
2010 Aug 20
3
change object name within for loop
Hi,
I am writing a for loop that creates one object, say 'outn' on every
round of the loop. I would like the name of each object to include the
index of the loop as in, for example:
out1, out2, out3, ...
And I would like the naming of the object to take place automatically
as the loop moves through?
Similarly, I would like to be able to call different objects (in1,
in2, in3,
2011 Sep 08
3
Density function: Area under density plot is not equal to 1. Why?
Hi, I have a vector 'data' of 58 probability values (bounded between 0 and 1) and want to draw a probability density function of these values. For this, I used the commands:
data <- runif(58)
a <- density(data, from=0, to=1)
plot(a, type="l",lwd=3)
But then, when I try to approximate the area under the plotted curve with the command:
area <- sum(a$y)*(a$x[1]-a$y[2])
2004 Sep 07
1
Contrast matrices for nested factors
...1 0 0 0
12 1 -1 -1 0 0 1 0 0 0
13 1 -1 -1 0 0 -1 0 0 0
14 1 -1 -1 0 0 -1 0 0 0
(notice that in the second matrix all collumns sum to 0, in the
first they don't).
Thank you,
--
Fernando Henrique Ferraz P. da Rosa
http://www.ime.usp.br/~feferraz
2003 Jan 30
2
Weird options(digits=n) behaviour
I noticed some very weird behaviour of the function: options(digits=n),
where n is the number of digits you would expect to get in R calculations.
Let's take a example:
> options(digits=4)
> getdata(caso.pool.k3.r3.e2)
[1] 6.053 2.641 -3.639 14.259 6.082
Which works fine... now, trying again, with different data:
> options(digits=4)
> getdata(controle.pool.k3.r3.e2)
2003 Oct 11
1
DBI Interface broken
...("dbConnect"), "DBIConnection",
"dbConnect")
<environment: 0x91201a8>
Methods may be defined for arguments: drv
Anyone has a clue on what might be going on? Is it DBI working for any of you using R 1.8.0?
Thank you,
--
[]'s
Fernando Henrique Ferraz P. da Rosa
2007 Aug 21
2
extracting month from date in numeric form
Hi,
Anyone knows what would be a short way of extracting a month from a date in
numeric or integer format?
months("1979-12-20")
returns
"December" in character format.
How could I get 12 in numeric or integer format?
Thanks!
G.
[[alternative HTML version deleted]]
2007 Sep 11
0
Odp: storing text and decimal values in a matrix form
Hi
Gon?alo Ferraz <gferraz29 at gmail.com> napsal dne 11.09.2007 16:35:57:
> Thanks! What is the easiest way of declaring an empty data frame. Is
there
> anything similar to:
> matrix(0,x,y)
> In the help files, I am only finding longer commands that ask me to
specify
> each individual colu...
2004 Sep 11
3
SAS to R migration questions
Hi,
I'd like to get away from SAS, but I don't really know R well enough at
this point to know if it would be good for this project. I tried to
describe the essence of the project below without getting bogged down in
details.
It starts when I receive a data flat file. There's lots of columns, but
the relevant ones are:
custid (customer ID number)
saledt (date of sale)
2008 Mar 15
3
locating minimum value in matrix
Hi,
I have a matrix BEE and want to find the row and column numbers of
the minimum value in that matrix.
The command
which(BEE==min(BEE))
returns only one value which, I take, is the position of the minimum
in a vector with as many elements as the matrix.
Is there a quick and simple way of getting row and column numbers?
Thanks,
Gonçalo
[[alternative HTML version deleted]]
2003 Jun 17
2
Paste and namespace
Hi, my doubt is very simple. I'm sure I've seen someone using something
like this before, but unfortunatelly my searches in the archives were useless.
Well, I have some objects called after a name that has a number attached to
it,
varying. Let's say I have:
> ls
poly1 poly2 poly3 poly4 poly5 poly6 ...
I would like to access these objects using a for(), in which I could do
2007 Oct 15
2
clipping off words inside a vector of strings
Hi,
I have a vector of strings (class character) with 6 elements (length
6). I call it 'names'.
"Graham Chapman"
"John Cleese"
"Terry Gilliam"
"Eric Idle"
"Terry Jones"
"Michael Palin"
And I want to turn it into another vector of strings called
'shortnames' with the same length.
The new vector should look like:
2003 Jun 19
2
Subseting by more than one factor...
Is it possible in R to subset a dataframe by more than one factor, all at
once?
For instance, I have the dataframe:
>data
p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 pred
1 0 1 0 0 0 0 0 0 0 0 0.5862069
4 0 0 0 0 0 0 0 0 0 1 0.5862069
5 0 0 0 0 0 0 1 0 0 0 0.5862069
6 0 0 0 0 0 0 0 1 0 0 0.5862069
7 0 0 1 0 0 0 0 0 0