David Winsemius comcast.net> writes:
>
> The strategy of cbind vectors as an argument to data.frame and then
> naming them seems wasteful and error prone. Why not:
>
> z <- data.frame(n=factor(n),y=y)
> # all one step, no issues about every element needing to be the same
> mode
> # and no
On Jun 29, 2011, at 4:29 PM, Peter Maclean wrote:
People with more experience in R I need help on this.
I would like to drop observation if they meet certain condition. In
this example
I would like to drop group 2 in "n" because the group in "Y" has
more than 2
zeroes.
#Example
n <- c(1, 1
Hi Charlene,
Have you looked at:
>?subset
dror
--
View this message in context:
http://r.789695.n4.nabble.com/drop-observations-tp3168884p3168906.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
http
On Dec 30, 2010, at 5:53 PM, David Winsemius wrote:
On Dec 30, 2010, at 4:54 PM, Charlène Cosandier wrote:
Hi,
I want to drop observations with value 0 from my data.frame "dta"
for each
of the two variables "c01" and "ctotale". How can I do that?
And on second look I wonder if my trans
On Dec 30, 2010, at 4:54 PM, Charlène Cosandier wrote:
Hi,
I want to drop observations with value 0 from my data.frame "dta"
for each
of the two variables "c01" and "ctotale". How can I do that?
Thanks
subset(dta, !( c01==0 | ctotale==0) )
... remembering of course to assign this resu
Hi,
I want to drop observations with value 0 from my data.frame "dta" for each
of the two variables "c01" and "ctotale". How can I do that?
Thanks
Charlène Lisa Cosandier
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing l
On May 28, 2010, at 5:58 PM, Christian Schoder wrote:
Dear R-users,
I use firm-level data in panel structure. I would like to drop all
firms that have less than x observations over the time scale in any
of the variables considered. I would appreciate any help that (a)
indicates relevant
Dear R-users,
I use firm-level data in panel structure. I would like to drop all firms that
have less than x observations over the time scale in any of the variables
considered. I would appreciate any help that (a) indicates relevant literature
or websites or (b) indicates the code that could s
8 matches
Mail list logo