similar to: how to replace the second "-"

Displaying 20 results from an estimated 20000 matches similar to: "how to replace the second "-""

2008 May 14
2
basename/dirname produce incorrect results
The incorrect result incurs when the file path contains Chinese character. It seems that dirname/basename action on unit of byte instead of char, so the result in the following example is half of what is expected. > g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt" > dirname(g) [1] "d:/$BG!2L4^(B" > basename(g) [1] "$BG!2L4^M-(B" -- HUANG Ronggui,
2008 Jan 21
3
Need suggestions about GUI
What I want to do is: 1, creat a text box, insert text into that box. 2, select chunk of of the text by mouse, and link it to a lable. so I would like a way to get that chunk of text. Can I do such job with tcltk? Any relavant tutorial materials? Thanks -- HUANG Ronggui Bachelor of Social Work, Fudan University, China Master of sociology, Fudan University, China Ph.D. Student , CityU of
2007 May 19
2
What's wrong with my code ?
I try to code the ULS factor analysis descrbied in ftp://ftp.spss.com/pub/spss/statistics/spss/algorithms/ factor.pdf # see PP5-6 factanal.fit.uls <- function(cmat, factors, start=NULL, lower = 0.005, control = NULL, ...) { FAfn <- function(Psi, S, q) { Sstar <- S - diag(Psi) E <- eigen(Sstar, symmetric = TRUE, only.values = TRUE) e <- E$values[-(1:q)] e <-
2005 Nov 27
2
multilevel models and sample size
It is not a pure R question,but I hope some one can give me advices. I want to use analysis my data with the multilevel model.The data has 2 levels---- the second level has 52 units and each second level unit has 19-23 units.I think the sample size is quite small,but just now I can't make the sample size much bigger.So I want to ask if I use the multilevel model to analysis the data set,will
2008 May 12
1
Insert a recorde into a table using SQL
Dear list, I want to insert a recorde into a SQLite table by dbGetQuery(), but there is a problem when the value contains quotation mark. > dd<-data.frame(txt=c("having both ' and \" in character.","OK")) > library(RSQLite) Loading required package: DBI > con<-dbConnect(dbDriver("SQLite"),":memory:") >
2005 Oct 15
2
how to import such data to R?
the data file has such structure: 1992 6245 49 . . 20 1 0 0 8.739536 0 . . . . . . . . "alabama" . 0 . 1993 7677 58 . . 15 1 0 0
2012 May 09
2
file path
Dear all, is there any function to assert whether a file path is legitimate, and to convert any potential file path to a legitimate file path? I automate a batch of files and write them to plain text files with cat(). The file argument of cat() is generated automatically which may contain characters such as ? < >, unacceptable in Windows OS. What I do at this moment is to strip such
2008 Jun 07
1
Problem of installing Matrix
[wincent at PC-BSD]export MAKE=gmake [wincent at PC-BSD]sudo R ..... > install.packages("Matrix") --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://bibs.snu.ac.kr/R/src/contrib/Matrix_0.999375-9.tar.gz' Content type 'application/x-gzip' length 1483674 bytes (1.4 Mb) opened URL
2005 Dec 12
3
question about date's
Hi, Given a frame with calendar date's: "2005-07-01", "2005-07-02","2005-07-03","2005-07-04","2005-07-05",etc. I want to extract the following from these dates: week number month number year number Any ideas how to accomplish this? Many thanks. Regards, Richard
2006 Apr 14
3
The object argument of NextMethod.
My question is when the object argument of NexthMethod be used? In the following example, weather object argument is used will not affects the result. ### foo=function(x) {UseMethod("foo")} foo.cls1=function(x) { x=x+1;class(x)<-"ncls" NextMethod() } foo.ncls=function(x) { cat("ncls\n") } foo.cls2=function(x) { cat("cls2\n");print(x) }
2006 Oct 20
1
Where can I get the sweave package ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible Url : https://stat.ethz.ch/pipermail/r-help/attachments/20061020/616112b4/attachment.pl
2005 Oct 23
1
question about technieque do with large computation
The green book tells:"The basic technique is classic :keep it simple ."A long ,complicated expression or function is less fravorable than" a relatively small computations that combines calls to a few other functions to perform its tasks." But I don't get the point totally.Can anyone give me an example to make me understand this rules totally? ps: Is it mean that f1 is
2007 May 27
2
Question about "evalq"
The help page of eval says: The 'evalq' form is equivalent to 'eval(quote(expr), ...)'. But the following is not equivalent. Can anyone give me some explaination? Thanks very much. > f1 <- function(x,digits=5) lapply(x, f2) > f2 <- function(x) eval(quote(print(x+1,digits=digits)),list(x=x),parent.frame(2)) > f1(list(x1=1)) [1] 2 $x1 [1] 2 > > f1 <-
2006 Nov 23
2
writing character to a file in UTF-8
Dear lister, I would like to now if there a universal way to writing a character vector to a file in UTF-8 encoding? By " universal", I mean a way which works under Linux, Windows and Mac. Thanks in advance! -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China
2011 Apr 26
1
rJava Help
I believe this posting is placed, and I take the liberty to re-direct to the r-help mailing list. Regards, Ronggui On 26 April 2011 12:33, <gopala at mail.gvsu.edu> wrote: > ?I am trying to create a web user interface using RApache. I need to install rJava packge but I am getting the following error message > > RApache Warning/Error!!! > > Error : .onLoad failed in
2007 Jun 15
2
method of rpart when response variable is binary?
Dear all, I would like to model the relationship between y and x. y is binary variable, and x is a count variable which may be possion-distribution. I think it is better to divide x into intervals and change it to a factor before calling glm(y~x,data=dat,family=binomail). I try to use rpart. As y is binary, I use "class" method and get the following result. >
2006 Feb 02
2
how to use mle?
>Y [,1] [,2] [,3] [1,] 0 1 0 [2,] 0 1 0 [3,] 0 0 1 [4,] 1 0 0 [5,] 0 0 1 [6,] 0 0 1 [7,] 1 0 0 [8,] 1 0 0 [9,] 0 0 1 [10,] 1 0 0 >X pri82 pan82 1 0 0 2 0 0 3 1 0 4 1 0 5 0 1 6 0 0 7 1 0 8 1 0 9 0 0 10
2005 Dec 06
7
R is GNU S, not C.... [was "how to get or store ....."]
======= 2005-12-06 22:16:17 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜======= >Martin Maechler a 侀crit : > >> please, please, these trailing ";" are *so* ugly. >> This is GNU S, not C (or matlab) ! >> >> but I'll be happy already if you could >> drop these ugly empty statements at the end of your lines... > >May I disagree ? >I find missing ";" at
2005 Nov 24
2
what's the meaning of these in R-lang?
In this case the environment contains the variables local to the function, and its enclosure is the environment of the enclosing function.(R-lang:p11) I want to know if the "enclosing function" means the closure of the function? for example ,if I call function mean(),and the create an environment,say e1,then the enclosure of e1 is the namespace of base package? Right? Thank you!
2006 Feb 22
2
does multinomial logistic model from multinom (nnet) has logLik?
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and Cragg.Uhler.R2, but the value from multinom does not have logLik.So my quetion is : is logLik meaningful to multinomial logistic model from multinom?If it does, how can I get it? Thank you! ps: I konw VGAM has function to get the multinomial logistic model with logLik, but I prefer use the function from "official" R