similar to: Fwd: Re: read.table (Error in file(file, "r") : unable to open connection)

Displaying 20 results from an estimated 7000 matches similar to: "Fwd: Re: read.table (Error in file(file, "r") : unable to open connection)"

2006 May 09
2
read.table (Error in file(file, "r") : unable to open connection)
G?day, I am trying to read in a table and am getting an error message stating that R is unable to open a connection to the file. ? Avonvegen<- read.table("Y:\Study Sites\Avon\nonspatial\datafiles\archive\Avon_VegEnh.dat ", sep=",", na.string="-9999", header=TRUE) Error in file(file, "r") : unable to open connection In addition: Warning message: cannot
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 Dec 11
1
Sorting problem
Sys.setlocale(,"C") x1 <- as.character(date()) # I use date to record the time, and save it to sqlite database, to it converted to character x1_2 <- strptime(x1, "%a %b %d %H:%M:%S %Y") x2 <- as.character(date()) x2_2 <- strptime(x2, "%a %b %d %H:%M:%S %Y") X<-c(x1_2,x2_2) order(X) ## I want to get the permutation other than the sorted vector. ##
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
2011 Jan 12
1
how to change strip text of effect plot
Dear r heper, How can I change the strip text, for example (16,23] in the following example, to other more informative text such as "high level" on the fly? library(effects) Cowles$ex2 <- cut(Cowles$extraversion,3) mod.cowles <- glm(volunteer ~ sex+neuroticism*ex2,data=Cowles, family=binomial) eff.cowles <- allEffects(mod.cowles) plot(eff.cowles,
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
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
2008 Dec 12
1
How to mimic select.list using RGtk2/gWidgetsRGtk2?
I want to write a function mimic the function of select.list(), here is my preliminary version. select <- function(x,multiple=TRUE,...){ ans<-new.env() g <- gwindow(title=title,wid=200,heigh=500) x1<-ggroup(FALSE,con=g) x2<-gtable(x,multiple=multiple,con=x1,expand=TRUE) gbutton("OK",con=x1,handler=function(h,...){ value <- svalue(x2) if (length(value)==0)
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 <-
2007 Jan 19
1
Where can I get the latex format manual?
In www.r-project.org I can find html and pdf format, and the R-x.x-x/doc/manual has texinfo format only. I can not find latex format manual. Am I miss something? Thanks for your hints. -- 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
2009 May 23
1
Draw a rectangle on top of an image using RGtk2?
Dear all, I use gtkImageFromFile to display an image. Then I want to do some gsignal to handle mouse event. I click the mouse and move a another position and release. I can get the position of the firs click and the release position, then I would to draw a rectangle to display the region I have selected. I need some hints on what functions should I look for. I tried to google but don't know
2009 Oct 20
1
RGtk2:::gdkColorToString throws an error
Dear all, I try to use RGtk2:::gdkColorToString, but it throws an error: Error in .RGtkCall("S_gdk_color_to_string", object, PACKAGE = "RGtk2") : gdk_color_to_string exists only in Gdk >= 2.12.0 I know what it means, but don't know to solve this problem because I don't know where I can download the referred gdk library. Any information? Thank you. -- HUANG
2009 May 29
1
GTK Tooltips under Linux
Dear all, I want to set tool-tips for a gtkButton. I use the following code which works under Windows. However, it doesn't work under Linux. Any hints? Thanks. library(RGtk2) b<-gtkButtonNewWithLabel("OK") gtkTooltips()$setTip(b,"Memo for a Button.") gw <- gtkWindow(show=F) gw$Add(b) gw$Show() > sessionInfo() R version 2.8.0 Patched (2008-12-10 r47137)
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:") >
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
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. >
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
2008 Nov 24
1
RQDA-0.1.5 is released
RDQA is a package for Qualitative Data Analysis built upon R. It works both on the Windows and Linux/FreeBSD platforms. RQDA is an easy-to-use tool to assist in the analysis of textual data. At the present, it supports only plain text format data. All the information is stored in SQLite database via the R package of RSQLite. The GUI is based on RGtk2, via the aid of gWidgetsRGtk2. It includes a