Is there a way to have xtabs and friends use tabs in their output to separate
columns rather than spaces? It would be great for importing into other
software.
TIA!
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Webb Sprague webb.sprague at gmail.com writes:
xtabs(~wkhp, x, exclude=NULL, na.action=na.pass)
wkhp
20 30 40 45 60 NA
1 1 10 1 3 4
now this doesn't even work
table(wtf, exclude=NULL)
wtf
[0,10) [10,20) [20,30) [30,40) [40,50) [50,60)
Webb Sprague webb.sprague at gmail.com writes:
xtabs(~wkhp, x, exclude=NULL, na.action=na.pass)
wkhp
20 30 40 45 60 NA
1 1 10 1 3 4
(Forgive me for the repost, but I just joined the R list, so maybe this will go
through.)
Now the above doesn't work! See :
Is there a way to have R return the line number in a script when it errors out?
I call my script like:
$ R --vanilla script.R output.txt
I seem to remember a long discussion about this at some point, but I can't
remember the outcome.
Tx
__
Hi all,
I cannot get xtabs to count NA's like I expect. Below is a sample session, and
note that the last two calls to xtabs() yield exactly the same thing.
I am running R-2.5.0 -- if there was a bug in xtabs that got fixed, I would
love
to know about it. If there is a bug tracker somewhere,
Hi ws,
You could tweak pyramid.plot in the plotrix package to do this.
I guess I will live without...
Unless you can spell the process out for doing that -- where is the source,
where would the package download be on my machine before (Mac OS X), who would I
send a working patch
Hi R-ers
Does anyone know how if there is a way to force pyramid plot where
you determine the bottom axis range? I want to compare many
different pyramids, so I am hoping to force the bottom axis range
from 0% to 10%.
Here is the code so far, if it matters:
mk.pyr = function(data,
Hi all
Another question related to my earlier -- how might I get transparency to work
with pyramid.plot in library(plotrix)? I can't figure it out, and the help
page
says it is there but doesn't give an example.
Thanks!
__
R-help@r-project.org
I am using ACS micro data (PUMS) with one of the columns as a
factor for the place of birth (POBPF). I would like to create
a column (POBR) containing a rank
corresponding to the place of the observation
in the POBPF rankings.
I wrote a blog entry on my solution:
Hi all,
I am using ACS micro data (PUMS) with one of the columns as a
factor for the place of birth (POBPF). I would like to create
a column (POBR) containing a rank
corresponding to the place of the observation
in the POBPF rankings. For example,
if a person is from Oregon, Oregon is
the
Here's a way to get to your solution, but it's not very pretty:
testdfr - data.frame(POB=c(Oregon,Oregon,Oregon,New
York,California,California))
nstates - length(unique(testdfr$POB))
testdfr$ POBR - c(nstates:1)[table(testdfr$POB)][testdfr$POB]
Hmm I will have to think on that for
11 matches
Mail list logo