similar to: (no subject)

Displaying 20 results from an estimated 100 matches similar to: "(no subject)"

2013 Mar 16
1
Errors or warnings for non-existent data
Good Evening Is there a setting that I can change in R so that I get either a warning or an error message if I reference non-existent data in a data frame? For example I get no warning or error message with the following: > set.seed(2013) > df0=data.frame(cbind(x=rnorm(1000),y=rnorm(1000))) > df0$z=df0$w > head(df0) x y 1 -0.09202453 1.51179695 2 0.78901912
2010 Oct 20
2
rowsum
Hello, I am trying to achieve something which I *think* is possible using rowsum, but a little help should be useful: Consider the following dataframe DF0: A B C 89 1 140 89 06 20 89 29 137 89 52 13 89 57 10 89 97 23 89 1 37 89 1 12 89 1 3 52 1 11 52 1 31 52 1 16 52 1 6 52 1 10 52 1 13 52 1 10 52 1 25 52 1 2 52 59 38 52 97 75 57 1 14 57 1 13 57 1 14 57 114 12 57 1 23 57 06 26 I need create a
2016 Oct 11
2
Colapsar una matriz con NA en una única fila
Hola Consulto por un problema que no consigo resolver. Tengo un dataframe con muchas columnas todas de texto. Cada columna tiene solamente un valor válido y el resto son NAs. También cada fila tiene un único valor válido. Quiero colapsar ese data frame en uno que tenga solamente una fila y todas las columnas. Intenté con loops, while, apply y otros parecidos pero no lo logro El ejemplo del
2012 May 06
2
Translation of matlab vectors code into r
Hi there I am new user of r, i would need some help to translate som code for vectors in matlab to r. I have managed to translate the first 7 rows, but not the rest. Could anyone give me any suggestions for this problem?? Matlab code: tempo=[]; temps=[]; tempn=[]; tempao=[]; tempas=[]; tempan=[]; for k=1:5 tempo = [tempo n_o(k,:)]; temps = [temps n_s(k,:)]; tempn = [tempn
2016 Oct 11
3
Colapsar una matriz con NA en una única fila
Javier Muchas gracias por su respuesta Aunque no está funcionando, pues si ejecuto: EncDTE1<- t.EncDTE1[ !is.na(t.EncDTE1$Var1),] obtengo Var1, Var2, Var3,...Varn con datos "texto", NA, NA....NA Pero al ejecutar EncDTE1<- t.EncDTE1[ !is.na(t.EncDTE1$Var2),] obtengo Var1, Var2, Var3,...Varn con datos NA,"texto", NA....NA Estoy tratando de dar la vuelta con el loop
2015 Aug 02
3
ayuda con análisis de supervivencia
Hola a todos, -Estoy estudiando el efecto de dos genotipos (~tratamientos) en la aparición de síndrome metabólico (MetS) con datos longitudinales recogidos a tiempo 0,7,10,15,20 y 25 años. -He hecho un dataframe con las siguientes variables MetS: Síndrome Metabólico (Si=1,No=0) bmi: Indice de masa corporal (IMC) cuando se produce la conversión a MetS+ . Para los que permancen MetS-, esta variable
2012 Feb 23
1
segfault when using data.table package in conjunction with foreach
Hi all, I'm trying to use the package read.table within a foreach loop. I'm grabbing 500M rows of data at a time from two different files and then doing an aggregate/tapply like function in read.table after that. I had planned on doing a foreach loop 39 times at once for the 39 files I have, but obviously that won't work until I figure out why the segfault is occurring. The
2007 Mar 14
0
cannot delete the last column of a dataframe using "[<-" (PR#9565)
Hi, If df is a dataframe, its last column can't be deleted using "[<-", but other columns can be deleted this way. Example: > (df <- df0 <- data.frame(x = 1:3, y = 4:6, z = 7:9)) x y z 1 1 4 7 2 2 5 8 3 3 6 9 > df[, "z"] <- NULL Error in x[[jj]] : subscript out of bounds > df[, 3] <- NULL Error in x[[jj]] : subscript out of bounds >
2008 Nov 29
2
Reading mixed tables
Dear R buddies, This weekend I became interested in solving Google Code Jam problems using R. I guess R may work very well in this kind of contests but the input of file has been a problem for me. Take this case for example (http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtchALEghjb250ZXN0cxjRzBQM), the files are usually of the form: A(number of lines for group 1) a11 a12 a13 a21
2012 Apr 25
2
GFI en modelos estructurales con lavaan
Se ha borrado un adjunto en formato HTML... URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20120425/dafc9a68/attachment.html>
2011 Nov 29
2
Help with recast() syntax
Dear Help-Rs,   I have data similar to the following:   DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("NEG", "POS"), class = "factor"), YR_MO = c(201011L, 201012L, 201101L, 201102L, 201103L, 201104L, 201105L, 201106L, 201107L, 201108L, 201109L, 201011L,
2012 Jan 13
2
read.table as integer
Hello, I have a csv file with many variables, both characters and integers. I would like to load it on R and do some operations on integer variables, the problem is that R loads the entire dataset considering all variables as characters, instead I would like that R makes the distinction between the two types, because there are too many variables to do: x1<-as.integer(x1)
2018 Dec 17
0
Documentation examples for lm and glm
Dear Heinz, ---------------------------------------------- > On Dec 17, 2018, at 10:19 AM, Heinz Tuechler <tuechler at gmx.at> wrote: > > Dear All, > > do you think that use of a data argument is best practice in the example below? No, but it is *normally* or *usually* the best option, in my opinion. Best, John > > regards, > > Heinz > > ###
2018 Dec 14
7
Documentation examples for lm and glm
FWIW, before all the examples are changed to data frame variants, I think there's fairly good reason to have at least _one_ example that does _not_ place variables in a data frame. The data argument in lm() is optional. And there is more than one way to manage data in a project. I personally don't much like lots of stray variables lurking about, but if those are the only variables out
1997 Apr 30
2
R-alpha: New Incomplete Beta Function
Here is a drop-in replacement for the R incomplete beta function. src/math/pbeta.c It is a slightly modified version of the cephes library one from Netlib. In the few cases I tried it seems to give at least 14 digit agreement with the one in S-PLUS (its hard to get more). I'm not sure what performance is like. I'd like to know if it helps with some of the problems which have been
2012 Feb 13
3
Change dataframe-structure
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120213/d2a5afa6/attachment.pl>
2001 May 31
1
failure in make check
I have a failure in 'make check' and I would appreciate assistance regarding what to do about it. Thanks -Don Installing R-1.2.3 on build[99]% uname -sr SunOS 5.8 (for those who may recall my previous request for help, I have updated GCC to 2.95.3, and configured with gcc, GCC's c++, and f77 [not g77]) Running 'make check' got this: creating `no-segfault.R'
2005 Aug 27
2
Softlinking to a dvd-drive with inconsistent mount points? => HAL-Support
Am Freitag, den 26.08.2005, 12:50 +0200 schrieb Holly Bostick: >>Problem solved: > >>http://portal.suse.com/sdb/en/2005/05/dkukawka_hal_mountpoints.html > > Thanks Hiji, that was useful for me too. Thats an ugly workaround that should be forbidden. See Below. > > It might be nice to be able to symlink "d::" to /dev/hdc > > and have wine figure out
2009 Mar 25
1
Confusion about ecdf
Hi, I'm bit confused about ecdf (read the help files but still not sure about this). I have an analytical expression for the pdf, but want to get the empirical cdf. How do I use this analytical expression with ecdf? If this helps make it concrete, the pdf is: f(u) = \sum_{t = 1}^T 1/n_t \sum_{i = 1}^{n_t} 1/w K((u - u_{it})/w) where K = kernel density estimator, w = weights, and u_{it} =
2009 Nov 02
1
AR Simulation with non-normal innovations - Correct
Dear Users, I would like to simulate an AR(1) (y_t=ct1+y_t-1+e_t) model in R where the innovations are supposed to follow a t-GARCH(1,1) proccess. By t-GARCH I want to mean that: e_t=n_t*sqrt(h_t) and h_t=ct2+a*(e_t)^2+b*h_t-1. where n_t is a random variable with t-Student distribution. If someone could give some guidelines, I can going developing the model. I did it in matlab, but the loops