similar to: Can't get sample function from "An Introduction to R" to work

Displaying 20 results from an estimated 10000 matches similar to: "Can't get sample function from "An Introduction to R" to work"

2003 Mar 04
4
writing several command line in R console
Hi R lovers I would like to know how to step to the next line in the R console editor without breaking the continuity of my code more clearly : if for example I write a function, so far i have to write the all code inside on the same line wich may become obscure as the function is more and more complex. I would like to do like in the example of the manuels: >twosam <- function(y1, y2) {
2007 Sep 14
1
Intercept in lm and in library(car): Anova
Hi I have two questions regarding the meaning of intercept outputs of lm. Question 1: In data set 1 (a fully-balanced design), the line with (Intercept) contains the overall mean, and the estimates contain the differences from the overall mean (matching those from model.tables). But in data set 2, the line with the intercept does not correspond to the overall mean and the estimates don't
2010 Dec 15
4
Generacion de binomiales correlacionadas
Buenas tardes, Estoy interesado en generar observaciones de una distribucion binomial bivariada en la que hay _cierto_ grado de correlacion (denotemoslo rho). Podria por favor alguien indicarme como hacerlo en R? Este es el contexto. Supongamos que se tienen dos experimentos en los que la variable respuesta _sigue_ una distribucion binomial, i.e., X_i ~Binomial(n_i, p_i), i=1,2 y que, por ahora,
2006 Jun 07
2
help with combination problem
hello: I have 3 data.frame objects. First df object: Of dim (149,31). Columns 2:31 are marked as T1..T14 and N1..N16. Name T1 T2 N1 T3 N2 N3 N4 T4 mu1 10 10 9 10 9 9 8 10 mu2 11 11 9 11 9 9 9 11 ... muN 12 12 9 11 9 9 8 12 Second df object: of Dim (50000,31). Columns 2:31 are maked as T1...T14 and N1..N16.
2008 Jun 04
1
Comparing two regression lines
Dear R users, Suppose I have two different response variables y1, y2 that I regress separately on the same explanatory variable, x; sample sizes are n1=n2. Is it legitimate to compare the regression slopes (equal variances assumed) by using lm(y~x*FACTOR), where FACTOR gets "y1" if y1 is the response, and "y2" if y2 is the response? The problem I see here is that the
2010 Jan 26
2
No space left on device in one node
Hi! We operate a 2-node cluster running OCFS2 on top of DRBD. It shows about 4.3 GB free space on the OCFS2 filesystem using df on both nodes, but one node can't even write 10 MB: df (ouput identical on both the nodes) $ df -k /cluster Filesystem 1K-blocks Used Available Use% Mounted on /dev/drbd0 83883484 80071096 3812388 96% /cluster $ df -i /cluster
2017 Aug 22
1
Error: mdbox .../storage: Duplicate GUID
Hi! When I force-resync a mailbox of mine, I see following output: # doveadm force-resync -u $USER $PATH doveadm($USER): Warning: mdbox .../storage: Inconsistency in map index ($X,$Y2 != $X,$Y2) doveadm($USER): Warning: fscking index file .../storage/dovecot.map.index doveadm($USER): Warning: mdbox .../storage: rebuilding indexes doveadm($USER): Error: mdbox .../storage: Duplicate GUID $G in
2012 Aug 24
3
Euclidean distance function
Hi, I should preface this problem with a statement that although I am sure this is a really easy function to write, I have tried and failed to get my head around writing functions in R. I can use R where functions exist to do what I want done, but have found myself completely incapable of writing them myself. The problem is that I have a table with several rows of species and several columns of
2019 Jul 21
6
[RFC] A new multidimensional array indexing intrinsic
Hello, We would like to begin discussions around a new set of intrinsics, to better express multi-dimensional array indexing within LLVM. The motivations and a possible design are sketched out below. Rendered RFC link here <https://github.com/bollu/llvm-multidim-array-indexing-proposal/blob/master/RFC.md> Raw markdown: # Introducing a new multidimensional array indexing intrinsic ## The
2008 Sep 30
0
[LLVMdev] Generalizing shuffle vector
Hi Mon Ping, Generalizing shufflevector would be great. I have an additional suggestion below. On 29-Sep-08, at 11:11 PM, Mon Ping Wang wrote: > I am proposing to extend the shuffle vector definition to be > <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> > <mask> ; yields <m x <ty>> > > The
2019 Jul 22
2
[RFC] A new multidimensional array indexing intrinsic
> It seems that the main advantage of your proposal is that it would allow for non-constant strides (i.e. variable length arrays) in dimensions other than the first one. Do these appear frequently enough in the programs that you're interested in to be worth optimizing for? Yes - at least in Chapel (which is one of the motivating languages) these are very common. In other words, typical
2019 Jul 22
2
[RFC] A new multidimensional array indexing intrinsic
We could also simply extend the existing inrange mechanism to non-constantexpr GEPs.  It would remove an inconsistency in the semantics, be relatively straight forward, and solve the motivating example. (I didn't read the proposal in full, so there may be other examples it doesn't solve.) Philip On 7/22/19 10:01 AM, Peter Collingbourne via llvm-dev wrote: > The restrictions of
2008 Sep 30
2
[LLVMdev] Generalizing shuffle vector
I agree further generalization seems like a very good idea. But I'd like to see what Mon Ping proposed implemented first so we have a better idea of the implementation cost. Thanks, Evan On Sep 30, 2008, at 6:44 AM, Stefanus Du Toit wrote: > Hi Mon Ping, > > Generalizing shufflevector would be great. I have an additional > suggestion below. > > On 29-Sep-08, at 11:11
2017 Jan 24
3
Convertir programa Matlab a R sacado de Threshold Models of Collective Behavior de Michèle Lai & Yann Poltera
Estimados Usuarios-R: Estoy convirtiendo un programa en Matlab a R. El original lo saqu de: Lai, M., & Poltera, Y. (2009). Lecture with computer exercises: Modelling and simulating social systems with matlab. Tech. rep., Swiss Federal Institute of Technology (December 2009). 27. Ahora estoy convirtiendo la siguiente funcin: function sizes = gridsizes(N,varargin) % gridsizes(N) calculates
2019 Jul 25
0
[RFC] A new multidimensional array indexing intrinsic
It's also very common in Fortran. -David Michael Ferguson via llvm-dev <llvm-dev at lists.llvm.org> writes: >> It seems that the main advantage of your proposal is that it would >> allow for non-constant strides (i.e. variable length arrays) in >> dimensions other than the first one. Do these appear frequently >> enough in the programs
2004 Oct 01
3
same test statistic for t-test with and without equal variance assumption
Could some kindly tell me if I am supposed to be getting the same test statistic value with var.equal=TRUE and var.equal=FALSE in t.test ? set.seed(1066) x1 <- rnorm(50) x2 <- rnorm(50) t.test(x1, x2, var.equal=FALSE)$statistic # 0.5989774 t.test(x1, x2, var.equal=TRUE)$statistic # 0.5989774 ??? Here are my own calculations that shows that perhaps the result when var.equal=TRUE is
2012 Dec 04
1
Solve system of equations (nleqslv) only returns origin
I'm solving 4 complex equations simultaneously. Code is below. The code returns only zero's for the solution though there should also be a non-zero result. I'm pretty confident that the equations are correct because they are straight from a published paper and I checked them pretty thoroughly. The parameter values I used are from the published paper as well. Any suggestions for how
2008 Sep 30
4
[LLVMdev] Generalizing shuffle vector
Hi, The current definition of shuffle vector is <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <n x i32> <mask> ; yields <n x <ty>> The first two operands of a 'shufflevector' instruction are vectors with types that match each other and types that match the result of the instruction. The third
1998 Mar 03
1
":" (seq) bug -- should not always coerce to integer!
The problem seems that ":" always coerces to integer, but should not.. 9.9:12 ## R: [1] 9 10 11 ## S-plus 3.4: [1] 9.9 10.9 11.9 ## and many more examples.... -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2010 Jul 24
1
Doubt about a population competition function
Hi, I'm doing a function that describe two populations in competition. that's the function that i wrote: exclusao<-function(n10, n20, k1, k2, alfa, beta, t){ n1<-k1-(alfa*n20) n2<-k2-(beta*n10) if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c (1:t)), ylim=range(n10, n20), xlab='tempo', ylab='tamanho populacional') points(t, n20, type='b',