similar to: sem and "simple variables"

Displaying 20 results from an estimated 90 matches similar to: "sem and "simple variables""

2007 Apr 19
1
Character coerced to factor and I cannot get it back
Something probably obivous but I don't see it. I needed to find the first 1 or two digits of some 5 and 6 digit numbers since they identified research sites while the rest of the number was the plot id. I converted the numbers to characters, got the first 1 or 2 characters as appropriate and went to add the new vector to the data.frame. For some reason R is insisting on turning the
2007 Apr 19
0
Fwd: RE: Character coerced to factor and I cannot get it back
--- John Kane <jrkrideau at yahoo.ca> wrote: > Date: Thu, 19 Apr 2007 15:50:36 -0400 (EDT) > From: John Kane <jrkrideau at yahoo.ca> > Subject: RE: [R] Character coerced to factor and I > cannot get it back > To: Jorge Cornejo-Donoso <jorgecornejo at uach.cl> > > > --- Jorge Cornejo-Donoso <jorgecornejo at uach.cl> > wrote: > > >
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
I need to apply a yearly inflation factor to some wages and supply some simple sums by work category. I have gone at it with a brute force "for" loop approach which seems okay as it is a small dataset. It looks a bit inelegant and given all the warnings in the Intro to R, etc, about using loops I wondered if anyone could suggest something a bit simpler or more efficent? Example:
2007 Apr 20
0
Fwd: Re: Character coerced to factor and I cannot get it back
--- John Kane <jrkrideau at yahoo.ca> wrote: > Date: Fri, 20 Apr 2007 10:47:45 -0400 (EDT) > From: John Kane <jrkrideau at yahoo.ca> > Subject: Re: [R] Character coerced to factor and I > cannot get it back > To: jim holtman <jholtman at gmail.com> > > Thanks Jim, > > I can live with it as a factor or I will do as you > suggest. What is bothering
2011 Aug 23
0
Matrix:::qr.qy and signature(qr = "sparseQR", y = "dgCMatrix")
> sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Matrix_0.999375-50 lattice_0.19-30 loaded via a namespace (and not attached): [1] grid_2.13.1
2007 Mar 27
3
Unexpected result of as.character() and unlist() applied to a data frame
Hi, > dd <- data.frame(A=c("b","c","a"), B=3:1) > dd A B 1 b 3 2 c 2 3 a 1 > unlist(dd) A1 A2 A3 B1 B2 B3 2 3 1 3 2 1 Someone else might get something different. It all depends on the values of its 'stringsAsFactors' option: > dd2 <- data.frame(A=c("b","c","a"), B=3:1, stringsAsFactors=FALSE) > dd2
2012 Aug 06
1
more efficient way to parallel
Dear All, Suppose I have a program as below: Outside is a loop for simulation (with random generated data), inside there are several sapply()'s (10~100) over the data and something else, but these sapply's have to be sequential. And each sapply do not involve very intensive calculation (a few seconds only). So the outside loop takes minutes to finish one iteration. I guess the better way
2014 Jul 21
2
Inserción de condicionales en pequeño código
Buenas tardes, He construido la función “myfun” al objeto de considerar aquellas persones que a partir de una determinada fecha de Apertura tienen como mínimo 65 años. Se tiene su fecha de nacimiento, su fecha de inicio en la institución y su fecha de salida de la misma. Doy vueltas al script y no acabo se saber cómo poder aplicar de un modo eficiente las instrucciones “if” ó bien “ifelse”, y me
2011 Aug 24
1
silently testing for data from another package for .Rd examples
In an .Rd example for a package, I want to use data from another package, but avoid loading the entire package and avoid errors/warnings if that other package is not available. If I don't care about loading the other package, I can just do: if (require("ElemStatLearn", quietly=TRUE)) { data(prostate) # rest of example } I'd rather just be able to do something like:
2008 Mar 24
1
Great difference for piecewise linear function between R and SAS
Dear Rusers, I am now using R and SAS to fit the piecewise linear functions, and what surprised me is that they have a great differrent result. See below. #R code--Knots for distance are 16.13 and 24, respectively, and Knots for y are -0.4357 and -0.3202 m.glm<-glm(mark~x+poly(elevation,2)+bs(distance,degree=1,knots=c(16.13,24)) +bs(y,degree=1,knots=c(-0.4357,-0.3202
2013 Nov 17
1
FactoMineR
Hola. Como te dijo Carlos, el problema está en los nombres de las columnas y en los nombres de las filas. Cuando hice la importación (con dd<-read.csv('mortality.csv'), tuve problemas con las filas de nombre: - Malignant tumour of the larynx trachea bronchus and lungs - Malignant tumour of the lip pharynx and mouth - Other endocrinological metabolic and nutritional conditions
2007 Feb 22
0
daisy function in cluster- coerced NAs
I am currently using the function daisy in package cluster to create a dissimilarity matrix because my multivariate dataset contain missing data and variables of various types including factors, symmetric and asymmetric binary and quantitative. This is a step prior to using pco within ecodist. There is a warning which comes twice ">NAs introduced by coercion" I've used
2003 Dec 04
4
bug in as.POSIXct ?
I think that there is a bug in the as.POSIXct function on Windows. Here is what I get on Win2000, Pentium III machine in R 1.8.1. > dd1 <- ISOdatetime(2003, 10, 26, 0, 59, 59) > dd2 <- ISOdatetime(2003, 10, 26, 1, 0, 0) > dd2 - dd1 Time difference of 1.000278 hours Now, the 26th of October was the day that change to the standard time occurred, so I suspect that this has
2018 Oct 05
0
Seg fault stats::runmed
>>>>> Hilmar Berger >>>>> on Fri, 5 Oct 2018 10:17:49 +0200 writes: > Dear all, I just found this issue: > I just found this issue: > dd1 = c(rep(NaN,82), rep(-1, 144), rep(1, 74)) > xx = runmed(dd1, 21) >> R crashes reproducibly in R 3.4.3, R3.4.4 (Ubuntu 14.04/Ubuntu 16.04) and also in the latest development version
2009 May 31
1
Error:non-numeric argument in my function
Hello! I have a function: zywnoscCalosc<- function( jedzenie, n1, n2, n3, n4, d1, d2, d3, d4 ) { ndf <- data.frame(nn1=n1,nn2=n2,nn3=n3,nn4=n4) ddf <- data.frame(dd1=d1,dd2=d2,dd3=d3,dd4=d4) for (i in 1:length(n1)){ wekt_n = ndf[i,] wekt_n_ok = wekt_n[!is.na(wekt_n)] dl_n = length(wekt_n_ok) wynik = (1*wekt_n_ok)/(1*dl_n) } } and I get an error like this: Error in 1 * wekt_n_ok :
2010 Aug 16
1
data frame handling
Dear all, I have an xts object , t.xts with 4 columns: "v1" "DD1" "v2" "DD2" and created a data frame : t <- as.data.frame(t.xts) I would like to extract data and create a new data frame for when the values in column DD1 falls between 0 and 30 and extract the corresponding v1 value. How can I do this? Thanks. -- View this message in context:
2008 Apr 14
3
Doing the right amount of copy for large data frames.
Hi there, Problem :: When one tries to change one or some of the columns of a data.frame, R makes a copy of the whole data.frame using the '*tmp*' mechanism (this does not happen for components of a list, tracemem( ) on R-2.6.2 says so). Suggested solution :: Store the columns of the data.frame as a list inside of an environment slot of an S4 class, and define the '[',
2018 Oct 05
2
Seg fault stats::runmed
Dear all, I just found this issue: dd1 = c(rep(NaN,82), rep(-1, 144), rep(1, 74)) xx = runmed(dd1, 21) -> R crashes reproducibly in R 3.4.3, R3.4.4 (Ubuntu 14.04/Ubuntu 16.04) With GDB: Program received signal SIGSEGV, Segmentation fault. swap (l=53, r=86, window=window at entry=0xc59308, outlist=outlist at entry=0x12ea2e8, nrlist=nrlist at entry=0x114fdd8, print_level=print_level at
2007 Dec 18
2
R brakes when submitting a query to MySQL
Hello, I would like to retrieve data stored in MySQL database, so I installed RMySQL package. I can successfully connect with the my database using the following code > dvr<-dbDriver("MySQL") > con2<-dbConnect(dvr,group="exbardiv") > mysqlDescribeConnection(con2) <MySQLConnection:(972,0)> User: mmorag Host: localhost Dbname: exbardiv
2009 Jun 02
2
What do you think about my function?
Hello, I want to know what do you think about my function. I know that it isn't briliant :/ but what do you think? What I should do that my function will be better? (now is very slow and not ideal, sometimes I also get a mistake!) ########## My function ############################################# dzieci<-transform(dzieci, zywnosc=0) zywnoscCalosc<- function( jedzenie, sklep, n1, n2,