Thanks for the reply. What I meant was that there is no int(), if you do a
?readBin, you will find it there.
On Friday, September 2, 2016 6:31 AM, Jim Lemon
wrote:
Hi Yucheng,
Have a look at "An Introduction to R" (get there with "help.start()"), section :
3.1 Intrinsic attributes: mo
Thanks a lot. Your code does the trick.
One last question:
The tabulate produced is showing every cross in just one column.
I mean, it presents the region by order and sex=1, and then again the
region but by sex==2.
Can i list or present as this:
sex1 sex2
region1 323. 34
# mean
svymean( ~ income_variable , NN )
svyby( ~ income_variable , ~ age + sex , NN , svymean )
# median
svyquantile( ~ income_variable , NN )
svyby( ~ income_variable , ~ age + sex , NN , svyquantile , 0.5 )
On Fri, Sep 2, 2016 at 3:04 PM, Juan Ceccarelli Arias
wrote:
> Hello
> Im analyzin
Chuck:
I think this is quite clever. But note that the which() is
unnecessary: logical indicing suffices, e.g.
df[!duplicated(df[,c("f","g")],fromLast = TRUE),]
I thought that your approach would be faster because it moves
comparisons from the tapply() to C code. But I was wrong. e.g. for 1e6
ro
Hello
Im analyzing a survey and i need to obtain some statistics per groups.
Im able to create a table with sex and age. However, if i want to know how
much income earns the population by sex and age, i can't.
Im loading the dataset as describe the line below
NN <- svydesign(ids = ~1, data = encues
On Fri, 2 Sep 2016, Bert Gunter wrote:
[snip]
The "trick" is to use tapply() to select the necessary row indices of
your data frame and forget about all the do.call and rbind stuff. e.g.
I agree the way to go is "select the necessary row indices" but I get
there a different way. See below.
Hi Bert,
This is the best method I have seen this year! do.call, rbind has just gone
to museum :)
It took ~30 second to get the results. You deserve a medal
Jun
On Fri, Sep 2, 2016 at 1:51 PM, Bert Gunter wrote:
> This is the sort of thing that dplyr or the data.table packages can
> proba
Hello,
Try ?aggregate, it's probably faster.
With a made up data.frame, since you haven't provided us with a dataset,
simout.s1 <- data.frame(SID = rep(LETTERS[1:2], 10),
DOSENO = rep(letters[1:4], each = 5),
value = rnorm(20))
res2 <- aggregate(simout.s1$value,
This is the sort of thing that dplyr or the data.table packages can
probably do elegantly and efficiently. So you might consider looking
at them. But as I use neither, let me suggest a base R solution. As
you supplied no data for a reproducible example, I'll make up my own
and hopefully I have unde
Dear list,
I have the following line of code to extract the last line of the split
data and put them back together.
do.call(rbind,lapply(split(simout.s1,simout.s1[c('SID','DOSENO')]),function(x)x[nrow(x),]))
the problem is when have a huge dataset, it takes too long to run.
(actually it's > 3 h
You can use readr::write_excel_csv() which adds a BOM that forces excel to
read as UTF-8.
Hadley
On Friday, September 2, 2016, Erich Neuwirth
wrote:
> read_excel in Hadley’s readxl package
> should handle your encoding problems.
> Writing Excel files on a Mac, however, still is somewhat messy.
On Fri, 2 Sep 2016 at 00:43 Abdoulaye SARR wrote:
> Dear List,
>
> I have daily rainfall data in .bil format and can get info of the file
> using rgdal:
>
> > library(rgdal)
> > GDALinfo("/1981/v2p19810101.bil")
> rows1600
> columns 1500
> bands 1
> lower left origin.x-2
On Fri, Sep 2, 2016 at 9:10 AM, John Kane wrote:
> Over the last few years I came to the conclusion that using a spreadsheet
> for anything more complicated than my shopping list was madness.
> I am now reconsidering my position on shopping lists.
>
I got a real laugh out of that one! When use
An alternative to Erich Neuwirth's solution might be to use Apache OpenOffice
or the (roughly) equivalent LibreOffice. I routinely use UTF-8 with these.
John Kane
Kingston ON Canada
> -Original Message-
> From: govo...@gmail.com
> Sent: Fri, 2 Sep 2016 13:03:20 +0200
> To: r-help@r-proj
Over the last few years I came to the conclusion that using a spreadsheet for
anything more complicated than my shopping list was madness.
I am now reconsidering my position on shopping lists.
Thanks Bert. I have a small collection of spreadsheet errors that have been
published here and there
read_excel in Hadley’s readxl package
should handle your encoding problems.
Writing Excel files on a Mac, however, still is somewhat messy.
And you probably should post this kind of question on r-sig-mac
On 02 Sep 2016, at 13:03, Kai Mx wrote:
>
> Hi all,
>
> I am hoping for some advice on h
Hi all,
I am hoping for some advice on how to handle UTF-8 spreadsheet files in a
Mac environment - sort of off-topic, but still relevant for hopefully a
bunch of people.
I am using R on Mac OS 10.10. Sometimes I have the urge to actually look at
a large spreadsheet on the big screen or make some
Dear Kristina
I do not use that package so cannot offer any direct help but
1 - can you fit the model with any other combination of parameters?
2 - what happens if you vary rho?
3 - if your data-set is small and not confidential can you share it,
otherwise can you show us str(anxiety_control) o
Hi Yucheng,
Have a look at "An Introduction to R" (get there with "help.start()"), section :
3.1 Intrinsic attributes: mode and length
The distinction between numeric and integer modes in R may not be
obvious, but it is important at times.
Jim
On Fri, Sep 2, 2016 at 5:47 AM, Yucheng Song via R
Hi
I do not consider myself as an expert in drc.
AFAIK in drc plotting you plot response against actual dose.
You have 3 options
Plot dose values in non log axis
plot(mod, type="all", log="")
Plot dose values in log axis
plot(mod, type="all", log="x")
or plot log(dose) values in non log axis
p
Hi, In the help or readBin, there is an "int", but actually there is no int(),
do you mean some other types? In fact, numeric() is kind of misleading, what
does it mean?
what Either an object whose mode will give the mode of the vector to be read,
or a character vector of length one describing
Hello all,
I would like to have two or maybe three extra “for”. One for changing beta_x
with values 0.00 and 0.20 and the others for changing phi_x and phi_y with
values 0.00, 0.30, 0.90.
Does anyone know how to implement this?
library(MASS)
library(forecast)
library(lmtest)
library("dyn")
lib
22 matches
Mail list logo