[R] read .asc from web into R

2018-06-03 Thread Qian Yiting
Hi All, I am new to R. To import data with .asc ending from the web into R, I have tried many functions for importing data but it came out not well. The problem may seem to be very basic but unfortunately I haven’t found any useful information somehow. Which command should I use for that pur

[R] How do you capture warning messages from rstan package's stan() function, when running an R script that calls stan() on the command line?

2016-08-24 Thread Qian Sophia Zhang
log") sink(con, append=TRUE) sink(con, append=TRUE, type="message") to the top of Fit12_for_stack.R, but test.log again showed output, without stan() warning messages. Fit12_for_stack.R and a file it uses, try8.stan, are attached. Thanks, Qian P.S. If you prefer responding via Stack

Re: [R] Avoid using "eval" in a neat way

2014-02-01 Thread Hai Qian
#.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On February 1, 2014 8:40:47 AM PST, Hai Qian wrote:

Re: [R] Avoid using "eval" in a neat way

2014-02-01 Thread Hai Qian
elsewhere. I suggest doing a web search, read up on the issue, and > post back here only if you have specific questions that are not > answered already. > > Best, > Ista > > On Sat, Feb 1, 2014 at 11:40 AM, Hai Qian wrote: > > I know using eval is not optimal and maybe bad, b

[R] Avoid using "eval" in a neat way

2014-02-01 Thread Hai Qian
I know using eval is not optimal and maybe bad, but how to avoid using eval in the following example func1 <- function(dat, eval.this) { eval(parse(text = paste0("with(dat, ", eval.this, ")"))) } dat <- data.frame(x = 1:2, y = 2:3) func1(dat, "x*2+y") func1(dat, "sin(x)*cos(y)") Here eval.

[R] How to show Vignettes download link on CRAN package page

2014-01-11 Thread Hai Qian
Hi, This question might be stupid, but I cannot find the answer anywhere. Some packages, like RUnit ( http://cran.r-project.org/web/packages/RUnit/index.html) has a "Vignettes:" download link on that CRAN page. However, my package PivotalR ( http://cran.r-project.org/web/packages/PivotalR/) does

Re: [R] degrees of freedom for contrast

2012-06-07 Thread Qian Liu
degrees of freedom for the t tests of all the contrasts? Thank you very much. Qian >mylong.lme <- lme(dscore~Trt.Pheno-1, data=mylong, random=~1 | ID, method="ML") > summary(mylong.lme) Linear mixed-effects model fit by maximum likelihood Data: mylong AIC BIClogLik

[R] degrees of freedom for contrast

2012-06-07 Thread Qian Liu
degrees of freedom for the t tests of all the contrasts? Thank you very much. Qian >mylong.lme <- lme(dscore~Trt.Pheno-1, data=mylong, random=~1 | ID, method="ML") > summary(mylong.lme) Linear mixed-effects model fit by maximum likelihood Data: mylong AIC BIC

[R] ROC plot for KNN

2011-08-30 Thread Qian Liu
? Thanks. Qian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

[R] Survival analysis: same subject with multiple treatments and experience multiple events

2011-04-22 Thread Qian Liu
correlation between the observation since the same subject was treated with two different drugs in two trials? Should I add "TRIAL" , "whether the event happened before", or "number of times the event happened before" as covariate(s)? Any input will b

[R] Fwd: HOW to use the survivalROC to get optimal cut-off values?

2010-10-20 Thread Qian
-- Forwarded message -- From: Qian Date: 2010/10/21 Subject: HOW to use the survivalROC to get optimal cut-off values? Dear sir, I am a student who want to use the time-dependent survivalROC package.according to the,reference material,it only gives a set of ordered cut-off values

[R] ask for a question with cch function

2010-09-28 Thread Qian Xiyuan
Dear all, I am reading the cch function source code. But I can not understand the following codes. Please help me. What's the fitter here? fitter <- get(method) out <- fitter(tenter = tenter, texit = texit, cc = cc, id = id, X = X, ntot = nn, robust = robust) [[alternative HTML version

[R] Categorical variables in estimating propensity score

2010-05-19 Thread Qian Zhang
the estimation or R would automatically omit it as if I include it in the estimation? I look forward to your response! Qian Zhang Department of Sociology University of South Carolina [[alternative HTML version deleted]] __ R-help@r-project.org

[R] plot() change unit length

2008-08-04 Thread Qian R
I am try to plot a data frame, and encounter some difficulties.   my x axis range is from -60 to 80 and unit length is 10 so x axis looks like   -60, -40, -20, .., 40,60,80   But I want chang unit length from 10 to 5   -60, -50, -40, .., 60,70,80   Does anyone know how to do it?  

[R] use variable value as vector name

2008-07-09 Thread Qian R
Here is my problem   a <- data$name[1]  b <- data$name[2] c <- data$name[3]   a "apple" b "pear" c "banana"   result  <- c( a = 2 , b=3, c=5)   output: a  b c 2  3 5   But I want my output apple  pear  banana 2 3 5 [[alternative HTML version deleted]] __

[R] plot( )

2008-05-09 Thread Qian R
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] substring

2008-05-06 Thread Qian R
I have a data frame such as Name DISC1_5916 DABC2_789 ABCD_1234 I want to substring column Name so that DISC1 DABC2 ABCD ... Thanks. - [[elided Yahoo spam]] [[alternative HTML version deleted]] __

[R] panel.xyplot()

2008-04-29 Thread Qian R
I am try to create a plot using xyplot(). I created a function panel.fun() wich generate segment, but I need use two columns from dataset2. library(lattice) panel.fun <- function(x, y, minx, maxx, miny, maxy) { panel.xyplot(x,y) # since I don't know how to call dataset2 inside panel

[R] lattice panle.segment()

2008-04-28 Thread Qian R
I am try to create a plot using xyplot(). I created a function panel.fun() wich generate segment, but I need use two columns from dataset2. library(lattice) panel.fun <- function(x, y, minx, maxx, miny, maxy) { panel.xyplot(x,y) # since I don't know how to call dataset2 inside panel

[R] pdf() and histogram() in function call

2008-04-23 Thread qian z
Here is a function I wrote. It runs no problem, but generate empty pdf files. I can't find what is the problem. create.pdf<- function(x, dir) { dir.create(dir, showWarnings = FALSE) plist<- c("a", "b" , "c", "d") for(j in plist) { filedir<- paste(dir,

[R] multi-level hierarchical logistic regression with sampling weight

2008-02-27 Thread GUO, Qian
Hi I would like to run a multi-level hierarchical logistic regression model with sampling weight? Is this possible with R? Thanks a lot, Qian Guo - [[alternative HTML version deleted]] __ R-help@r

[R] merge in function

2007-12-06 Thread qian z
I used merge() in a function, but it doesn't return correct data frame. add.name <- function(data, x) { ... ... newfile <- merge(data, resid, by =0, all.x=TRUE, all.y= FALSE) newfile } - [[alternative H

[R] options$max.print

2007-11-16 Thread qian z
I am working on a dataset. Some data appear in scientific notation format, such as 5.8237365731e-05. Right now I want them appear as decimal format. I try to use options(max.print=”10”), but it doesn’t work. How do I fix it? Thanks. --