Displaying 20 results from an estimated 10000 matches similar to: "development"
2008 Feb 13
2
apply on large arrays
I have a big contingency table, approximately of size 60*2*500*500,
and I need to count the number of cells containing a count of 1 for each
of the factors values defining the first dimension.
Here is my attempt:
tab1<-with(pisa1,table(CNT,GENDER,ISCOF,ISCOM))
tab2<-apply(tab1,1:4,function(x)ifelse(sum(x)==1,1,0))
tab3<-apply(tab2,1,sum)
Computing tab2 is very slow.
Is there a faster
2005 Dec 21
3
NextMethod causes R 2.2.0 to crash (PR#8416)
I found writing the following default method the for the generic
function "julian" causes R to crash.
julian.default <- function(x, ...) {
x <- as.Date(x)
NextMethod("julian", x, ...)
}
Here is a test example
> m <- as.Date("1972-09-27") + 0:10
> m
[1] "1972-09-27" "1972-09-28" "1972-09-29"
2008 Feb 01
6
Accessing the elements of a list
Hi R,
I wanted to know how do we access the elements of a list. In particular,
v=list(c(1,2,3,4,5),c(1,2,33,4,5),c(1,2,333,4,5),c(1,2,3333,4,5))
I want to access all the thirds items of the elements of the list. i.e.,
I want to access the elements, 3,33,333,3333. This can be done through
sapply as:
sapply(v,function(x) x[3])
But I need to access this without using
2007 Jul 03
1
termplot - changes in defaults
While termplot is under discussion, here's another proposal. I'd like to
change the default for partial.resid to TRUE, and for smooth to
panel.smooth. I'd be surprised if those changes were to break existing
code.
John Maindonald email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473 fax : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room
2006 Dec 22
5
substitute creates an object which prints incorrectly (PR#9427)
The function "substitute" seems to fail to make a genuine
substitution, although the printed verision seems fine. Here is an
example.
> m <- substitute(Y <- function(x) FUN(x+1),
+ list(Y = as.name("y"), FUN = as.name("sin")))
> m
y <- function(x) sin(x + 1)
> eval(m)
> y
function(x) FUN(x+1)
However the story doesn't end there. The
2005 Apr 30
3
as.numeric method for objects of class "difftime"
I have just become painfully aware that objects of class "difftime",
generated by the difference of two POSIXct objects, carry a "units"
attribute, which flashes by when the object is printed, for example.
The pain was occasioned when I tried to turn these objects into numberic
objects for use elsewhere as a covariate.
as.numeric(difftime object)
simply turns off the units
2007 Nov 15
3
generate combination set
I have a set data={A,B,C,D,E,F,G}
I want to choose 2 letter from 8 letters, i.e. generate the combination set
for choose 2 letters from 8 letters.
I want to get the liking:
combination set={AB,AC,AD,....}
Does anyone konw how to do in R.
thanks,
Aimin
2008 Apr 13
4
R equivalent of erfcinv in matlab
I am converting some matlab code into R that use inverse of the
complementary error function, erfcinv and did not find an equivalent in
R, is there such a function in some contributed modules?
Thanks.
2008 Mar 04
6
vector manipulations
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080304/9de37092/attachment.pl
2006 Jan 14
2
initialize expression in 'quasi' (PR#8486)
This is not so much a bug as an infelicity in the code that can easily
be fixed.
The initialize expression in the quasi family function is, (uniformly
for all links and all variance functions):
initialize <- expression({
n <- rep.int(1, nobs)
mustart <- y + 0.1 * (y == 0)
})
This is inappropriate (and often fails) for variance function
"mu(1-mu)".
2007 Jul 02
2
termplot with uniform y-limits
Does anyone have, or has anyone ever considered making, a version of
'termplot' that allows the user to specify that all plots should have
the same y-limits?
This seems a natural thing to ask for, as the plots share a y-scale. If
you don't have the same y-axes you can easily misread the comparative
contributions of the different components.
Notes: the current version of termplot
2007 Jul 02
2
termplot with uniform y-limits
Does anyone have, or has anyone ever considered making, a version of
'termplot' that allows the user to specify that all plots should have
the same y-limits?
This seems a natural thing to ask for, as the plots share a y-scale. If
you don't have the same y-axes you can easily misread the comparative
contributions of the different components.
Notes: the current version of termplot
2008 Mar 07
5
Puzzling coefficients for linear fitting to polynom
Hi,
I can not comprehend the linear fitting results of polynoms. For
example, given the following data (representing y = x^2):
> x <- 1:3
> y <- c(1, 4, 9)
performing a linear fit
> f <- lm(y ~ poly(x, 2))
gives weird coefficients:
> coefficients(f)
(Intercept) poly(x, 2)1 poly(x, 2)2
4.6666667 5.6568542 0.8164966
However the fitted() result makes sense:
>
2007 Nov 08
2
a newbie question about "data"
hi, I am reading Modern Applied Statistics with S 4th ed$B!#(B
page4 have these two lines:
> library(MASS)
> data(chem) # needed in R only
but I find withou the line " data(chem)"
I can still access chem, isn't it?
is it unnecessary or something i missed here?
thanks for the replay in advance.
2006 Nov 10
2
Command Line Prompt Symbol
Hi
I run R in Windows.
Is there a simple way of changing the prompt symbol ">" to, say, "R>" ?
(Not just for a temporary session, but every time R command window is
opened.) The documentation of doing this is rather "sparse".
Much appreciated for your assistance.
Jacob
Jacob L van Wyk
Department of Statistics
University of Johannesburg, APK
P O Box 524
2007 Oct 21
4
Input appreciated: R teaching idea + a way to improve R-wiki
Hi all,
I will be teaching a graduate-level course on R at CU Boulder next
semester. I have a teaching idea that might also help improve the R
wiki page... I wanted to know what you all thought of it and wanted to
solicit some advice about doing it.
During the latter part of the course, students will choose a topic of
interest (e.g., hierarchical linear modeling), and show how to achieve
it in
2007 Jan 07
1
substitute creates an object whichprints incorrectly (PR#9427)
> I think we should get rid of source attributes completely,
> since they are no longer needed, but your comment still
> applies to source references. We should strip them when code
> gets modified.
>
> Duncan Murdoch
I would be very concerned about losing source attributes-- it would
break a lot of my code :(! It's very useful to have a single portable R
object that
2008 Feb 26
1
The meaning of 'z value' and 'Pr(>|z|)' in the result of glm
Hi all,
I used the function 'glm' to perform logistic regression, and then use 'summary' to display the fitting result. There are 'z value' and 'Pr(>|z|)'
Do they simpily represent the result of 'z test' ? as I perform the 'z test' for a particular variable following the definition, it yields a different result.
Stephen Lau
2007 May 23
1
name of object in quotes
I am writing a function in which, at some point, I to recuperate the
name of a previous object in quotes. I am currently using the function
Cs() from the Hmisc library but the result is:
foo <- function(xvar) {
variable <- Cs(xvar)
return(variable)
}
foo(x1)
> "xvar"
when I would expected to obtain "x1".
Any suggestion?
Thanks
--
*Gonzalo Rivero*
Ph.D.
2008 Mar 13
1
(no subject)
Hi there,
Am try to find tree diameter increment in a hierarchical data with tree
diameter measurements, date of measurements, in plots that are located in
different region. How do I do it? am very new to R.
Thanks for you help.
Maina Kariuki
Level 3, 8 Nicholson Street
East Melbourne VIC 3002
Ph: (03) 9637 9809
Email: maina.kariuki@dse.vic.gov.au
Notice:
This email and any