Skip to content

Search Archives

Search tips
from:Name Search by author name, e.g. from:Duncan Murdoch "exact phrase" Match an exact phrase word1 word2 Match messages containing both words Date range Use the date pickers to filter results to a time period

Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.

228 results for “from:Jinsong Zhao”

depth of labels of axis
Jinsong Zhao · Sep 1, 2014 · r-help

Hi there, With the following code, plot(1:5, xaxt = "n") axis(1, at = 1:5, labels = c(expression(E[g]), "E", expression(E[j]), "E", expression(E[t]))) you may notice that the "E" within labels of axis(1...

how to deal with NaN in "boot" object
Jinsong Zhao · Sep 4, 2008 · r-help

Hi there, I use boot() to do bootstrap simulation on my statistic, I get a boot object, named "obj". For certain reasons, there are some "NaN" in obj$t. Now, I hope to get confidence interval using boot.ci(), it...

loading saved files with objects in same names
Jinsong Zhao · Aug 18, 2014 · r-help

Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to compare those objects through plotting. However...

how to assign a value to a specific position of a list
Jinsong Zhao · Apr 30, 2017 · r-help

Hi there, I have a problem with assign(). Here is the demo code: for (i in 1:10) { # create a list with variable name as list_1, list_2, ..., etc. assign(paste("list_", i, sep = ""), list()) # I hope to assign...

[off-topic] R Homepage
Jinsong Zhao · Apr 17, 2015 · r-help

Hi there, It's a off-topic post. It seems that the R home page changed a lot. There are no plot at the right frame. Why are they removed? Will it or an alternative be back in future? Another...

Error in colnames: target of assignment expands to non-language object
Jinsong Zhao · Mar 6, 2011 · r-help

Hi there, I cannot find a detailed explanation to the following error message: > colnames(matrix(1:10, ncol = 2)) <- c("X", "Y") Error in colnames(matrix(1:10, ncol = 2)) <- c("X", "Y") : target of assignment expands to non-language...

help on compilation of R help file in LaTeX format.
Jinsong Zhao · Feb 14, 2004 · r-help

Dear all, I hope to know how to compile the R help file in LaTeX format under Windows 2000. The TeX/LaTeX system is TeXLive 2002, and the version of R is 1.8.x. Another question, I hope to...

vector density plot
Jinsong Zhao · Mar 29, 2014 · r-help

Hi there, Is there a function in R that can draw vector density plot? The vector density plot example can be found here: http://reference.wolfram.com/mathematica/ref/VectorDensityPlot.html As for the vector field plot, I found a...

center or scale before analyzing using pls.pcr
Jinsong Zhao · Feb 4, 2004 · r-help

Dear all, I found pls.pcr package will give different results if the data are centered and scaled using scale(). I am not sure about when I should scale my data, and whether the dependent variable should be scaled. If...

paste workable code to R 4.0.0 cause error
Jinsong Zhao · Apr 28, 2020 · r-help

Hi there, I have a piece of source code with some inline comments in Chinese. It works well when I copy it from a editor (gvim here), and paste it to Rgui console on R 3.6.3, however, when...

A easy way to write formula
Jinsong Zhao · Jul 27, 2008 · r-help

Hi I have a data frame, including x1, x2, x3, and y. I use lm() to fit second-order linear model, like the following: ft <- lm(y ~ x1 + x2 + x3 + I(x1 * x1) + I(x1 * x2) + I(x1 * x3) + I...

how to keep colnames of matrix when put it into a data frame
Jinsong Zhao · Dec 9, 2018 · r-help

Hi there, In the following mini-example, I hope to keep the column names of mat, but failed. # mini-example > mat <- matrix(1:9, nrow = 3) > colnames(mat) <- paste("(", 1:3, ")", sep = "") > mat (1) (2) (3) [1,] 1 4 7...

how to enlarge the legend
Jinsong Zhao · Oct 9, 2022 · r-help

Hi there, in the following code, I'd like to enlarge the filled box but not the legend text. plot.new() legend("topleft", "text", fill = "gray") # filled box is too small legend("top", "text", fill = "gray", cex = 2) # filled box...

how to assign a value?
Jinsong Zhao · Dec 11, 2011 · r-help

Hi there, I hope to modify values in a vector or matrix in the following code: for (i in 1:9) { assign(paste("a.", i, sep = ""), 1:i) get(paste("a.", i, sep = ""))[i] <- i+50 } I get the following...

how to save object created by assign()
Jinsong Zhao · Nov 19, 2010 · r-help

Hi there, When I run the following code, I could get correct objects (with correct values): for(i in 1:6) { #-- Create objects 'r.1', 'r.2', ... 'r.6' -- nam <- paste("r",i, sep=".") assign(nam, 1:i) # save(nam...

is it possible to get the coordinate of mtext()?
Jinsong Zhao · Mar 17, 2014 · r-help

Hi there, I hope to rotate the Y label of axis(4) with -90 degree. I can typeset the Y label using text() with srt = -90. However, I cannot get the coordinate of the position that mtext() used. In other...

using ``<-'' in function argument
Jinsong Zhao · Dec 2, 2010 · r-help

Hi there, In function, it's usually using ``='' to assign default value for function argument. For newbie, it's possible to using ``<- '' to assign value for function argument. Although it's not a correct way, R don't give any...

is.na(strptime (...)) return TRUE on FreeBSD
Jinsong Zhao · May 11, 2023 · r-help

Hi there, The following codes may cause the problem in R 4.3.0 on FreeBSD in my last post: Error in as.POSIXlt.character(x, tz, ...) > (d <- strptime("1970-01-01 12:00:00 UTC", "%Y-%m-%d %H...

Confidence interval based on MLE
Jinsong Zhao · Feb 6, 2011 · r-help

Hi there, I have fitted a sample (with size 20) to a normal and/or logistic distribution using fitdistr() in MASS or fitdist() in fitdistrplus package. It's easy to get the parameter estimates. Now, I hope to report the...

class of strptime() output
Jinsong Zhao · Jan 5, 2015 · r-help

On 2015/1/5 17:28, Ben Bolker wrote: > Jinsong Zhao <jszhao <at> yeah.net> writes: > > >> In the following code snippet, >> # >> a <- strptime("121114 0510", "%m%d%y %H%M") >> b <- data.frame(date = a, res = 1:5) >> class(a...

Can't find what you're looking for? Try searching with Google .