Displaying 20 results from an estimated 5000 matches similar to: "what's the meaning of these in R-lang?"
2006 Jun 02
4
function environment
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
how can I automatically access the functions that I loaded into a
separate environment?
> save(A,B,file="myfun.r")
> load("myfun.r",envir=(ENV<-new.env()))
> ls(ENV)
[1] "A" "B"
?"[" turned up that I can access the functions via
> ENV$A
function ()
{
}
> ENV$A()
NULL
Now, how
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
2005 Nov 21
5
SPSS and R do they like each other?
Hi,
I wonder how well SPSS and R communicate, because I
need SPSS but would like to do some data manipulations
in R. However I am very afraid of never ending
import-export-complications ? especially with all
those labels and extra information my SPSS files
contain. My data come from SPSS and have to be
exported to SPSS again (because I need to produce
special output tables, which would be hard to
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
2005 Sep 21
5
error when loading rwinedt
the error msg is:
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Error in if (RWinEdtVersion) RWinEdtVersion <- scan(file.path(InstallRoot, :
argument is of length zero
Error: .onAttach failed in 'attachNamespace'
Error: package/namespace load failed for 'RWinEdt'
> version
_
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)
}
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 <-
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
2005 Jul 25
2
how to get the group mean deviation data ?
> n=10;t=3
> d<-cbind(id=rep(1:n,each=t),y=rnorm(n*t),x=rnorm(n*t),z=rnorm(n*t))
> head(d)
id y x z
[1,] 1 -2.1725379 0.07629954 -0.3985258
[2,] 1 -1.2383038 -2.49667038 0.6966127
[3,] 1 -1.2642401 -0.50613307 0.4895856
[4,] 2 0.2171246 0.86711864 -0.6660036
[5,] 2 2.2765760 -0.48547142 -1.4496664
[6,] 2 0.5985345 -1.06427035 2.1761071
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
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
2006 Oct 20
2
how to replace the second "-"
I have a string vector like these:
[1] "1-1-1" "1-1-2" "1-2-1"
And I wanna replace the second "-" with "0", that is, I wanna get the result
like: [1] "1-101" "1-102" "1-201".
How should I write the Regular Expressions? Thanks!
--
»ÆÈÙ¹ó
Department of Sociology
Fudan University
[[alternative HTML version deleted]]
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 Jun 13
5
slow loading with lme4
it takes a long time to load the lme4 package.anyone else encounter this problem?
> system.time(library(lme4))
佋佖伻侂佇佽佉仾伒伳伋佁伡伃伆侟仯伜Matrix
佋佖伻侂佇佽佉仾伒伳伋佁伡伃伆侟仯伜lattice
[1] 19.90 0.30 25.56 NA NA
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status Patched
major 2
minor
2004 Oct 18
3
how to study the code of R
i want to study R programming by studying the existing code from R itself,but
i don't know how to read the code,can any one give me some guide?
my R is installed in /usr/lib/R/
[ronggui at mylinux ronggui]$ /usr/lib/R/
afm bin doc etc include library modules share
> version
_
platform i586-mandrake-linux-gnu
arch i586
os linux-gnu
system i586,
2005 Mar 30
2
about memory
here is my system memory:
ronggui at 0[ronggui]$ free
total used free shared buffers cached
Mem: 256728 79440 177288 0 2296 36136
-/+ buffers/cache: 41008 215720
Swap: 481908 60524 421384
and i want to cluster my data using hclust.my data has 3 variables and 10000 cases.but it fails and saying have not
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
2009 Sep 12
2
could not find function "Varcov" after upgrade of R?
After upgrading R to 2.9.2, I can't use the anova() fuction.
It says "could not find function "Varcov" ".
What's wrong with my computer? Help needed, thanks!
Yao Zhu
Department of Urology
Fudan University Shanghai Cancer Center
No. 270 Dongan Road, Shanghai, China
[[alternative HTML version deleted]]
2006 Jan 05
2
Suggestion for big files [was: Re: A comment about R:]
[ronggui]
>R's week when handling large data file. I has a data file : 807 vars,
>118519 obs.and its CVS format. Stata can read it in in 2 minus,but In
>my PC,R almost can not handle. my pc's cpu 1.7G ;RAM 512M.
Just (another) thought. I used to use SPSS, many, many years ago, on
CDC machines, where the CPU had limited memory and no kind of paging
architecture. Files did