Hello ...
I was working with some older code today that started throwing errors I'd
never seen before. The source appears to be some sort of substition of
the text of the code on install time, I was hoping that someone might be
able to point me to what I'm doing wrong.
If I take the following f
On Fri, 13 Jan 2006, Ales Ziberna wrote:
> I am currently in the process of creating (my first) package, which (when
> ready) I intend to publish to CRAN. In the process of creating this package
> I have taken some code form existing packages. I have actually copied parts
> of functions in to new
> Sometimes even the easy stuff is difficult (for me)... I want to get
> input from different places to paste together an excel filename (so
> you know I'm using windows) that I can open with RODBC. I know about
Using file.path() might be an easier solution for this (and it will allow
your code t
> Like many, I am sure, I get R-Help in digest form. Its easy enough to
> browse the
> subject lines, but then if an entry interests you, you have to embark
> on this tedious search or scroll to find it.
> It would be great to have a "clickable" digest, where the topics list
> is a set of pointers,
> I don't know how to read data from posgresql to R.
The RdbiPgSQL package will read from Postgres. Its current incarnation is
available via Bioconductor (www.bioconductor.org).
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/list
> I am trying to output an dataframe from R to Excel file. Can anyone
> tell me how to do it? Thanks a lot.
write.csv() might get you where you want to go.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
> seemed successful. Then while attempting to getBioC() I had to force
> quit the R application since I had to attend to something else
> urgently. When i returned and tried to getBioC, I am getting errors
Why not just let it run?
> indicating that there is a lock on some files. So i would like t
> In Linux I would issue the command
> system('rm paste(path,'filename',sep='')')
> and this works just fine. It does not however work for windows, and I have
> no idea whether it would work on a mac.
> Is there a single command thay escapes me?
Yes.
help("file.remove")
> I am currently trying to install packages from BioConductor to R.
Then you probably want to post to the bioconductor mailing list instead of
the R mailing list.
> However, I received a error stating: "unable to connect to
> 'www.bioconductor.org' on port 80" May I know what is wrong and how
Th
> Is there a way of getting the argument list of a function from within
> that function? For example, something like
Would formals() work for you here?
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the p
> Is there a canonical means to apply a function
> over multiple arrays simultaneously? For example,
Would mapply() get you what you're looking for?
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
> Is there any function that can arrange a character in alphabetic order? Thanks for
> answer
Check out sort().
> vv <- c(letters[5:10], letters[20:11], letters[21:26], letters[4:1])
> vv
[1]
"e" "f" "g" "h" "i" "j" "t" "s" "r" "q" "p" "o" "n" "m" "l" "k" "u" "v" "w"[20]
"x" "y" "z" "d" "c" "b"
> Where I can to download rmutil package?
You can use the reposTools package from Bioconductor:
install.packages2("rmutil")
There's also the website:
http://popgen0146uns50.unimaas.nl/~jlindsey/rcode.html
__
[EMAIL PROTECTED] mailing list
https://stat
> Is there some fast (built-in?) way to get the OR of all the elements in
> a logical vector?
any() and all() should give you OR and AND, respectively. Perhaps this
should be in as a 'see also' for '|' and '&'.
-J
__
[EMAIL PROTECTED] mailing list
htt
Hi there ...
Not too long after the switch to using Subversion I tried to checkout &
build R but encountered an error - and being short on time at that point
put it off to look at later. So today I sat down again and was
encountering this error every time I would attempt to build:
dumping R cod
> I'm running R 1.9.1 and trying to load a macro I've written. It gives the e
> Error: bad restore file magic number (file may be corrupted)-- no data
> loaded
You probably want to use source() here, if you have the code in a
file. The load() command is for use with stuff saved via the
save() co
> Surely, there may be elegant solutions for this somewhat trivial issue. But,
> I cant find it. Can you help me? Thanks.
The 'Collate' field for DESCRIPTION. Section 1.1.1 of the R Extensions
manual should describe it for you.
__
[EMAIL PROTECTED] ma
Sorry, I missed the original message, so piggybacking off of a reply.
> On Tue, 29 Jun 2004, Ruben Solis wrote:
> > I've tried installing the MacOS X binaries for R available at:
> > http://www.bioconductor.org/CRAN/
> > I'm running MacOS X version 10.2.8.
Since this is coming out of our mirror
> implemented in MS-DOS to. The question for you is if you know about
> the existence of an R function that allows me to run -in Windows-
> executable files in MS-DOS from the R command window.
Does system() do what you're looking for?
__
[EMAIL PROTECT
> Hello! Please!How do I download R from the internet?
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How%20can%20R%20be%20obtained%3f
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
> gsub("","/","D:\Prog\R\rw1090\library\cluster\libs")
> [1] "D:ProgR\rw1090libraryclusterlibs"
Probably not the best way, but what about escaping all the backslashes in
the original string?
gsub("","/","D:\\Prog\\R\\rw1090\\library\\cluster\\libs")
__
> Yes, I agree with Ajay Shah's comments. The Rmetrics website makes a
> virtue of open source yet the Rmetrics people do not make available
> their package for the open source platform, Linux.
It wouldn't be difficult to create a source tarball and submit it to them
__
> I thought that 'rm' function would free the memory used for the
> deleted object, but it doesn't seem to be the case, as I don't observe
> any change in the allocated memory for R in the windows task manager.
> I ask this question because sometimes I have encounter a '... ran out
> of memory' err
> When will version 1.9 (for Windows) be ready, please?
You can download the beta version at
http://cran.r-project.org/bin/windows/base/rdevel.html
> My reason for asking: there is an interesting library from
> Bioconductor called tkWidgets. However, it will only
> work with version 1.9.0 or hi
> I have data in many files in a directory, how can I
> loop through the files in a given dir in-order-to
> build a data.frame?
Just use something like 'x <- dir(YOUR_ARGS_HERE)', and then you can do a
loop like:
for (i in x) {
do something
do something else
etc ...
}
-J
> Some web sites have "hit counters". It should be possible to get
> a counts of the numbers of times different parts of R are downloaded.
> Do the CRAN web sites include any such?
But how would CRAN know what sort of activity its mirrors is
receiving? And what does a 'download' mean i
Hello ...
Using R-1.9.0 alpha, I'm having some problem getting a few packages to
pass check under Windows - specifically with the 'missing link(s)' section
of the package install phase.
I started trying to track down how the missing link was showing up as in
some cases I could not see why the lin
> treshold <- function(pred) {
> Error in match.fun(FUN) : Object "threshold" not found
^
If this is a direct cut & paste, you have a typo as you've defined the
function as "treshold".
__
[EMAIL PR
> Before using winMenuAdd(), is it possible to test whether the menu already
> exists? One could use try(winMenuAddItem()) with appropriate arguments, but
> is there anything more elegant?
winMenuNames() and winMenuItems() should give you the sort of information
you're looking for, tho they're i
> I would like my program to load variables x,y,x from a file 'myFile.r' but
> if this file does not exist, I want my program to create/initialize x,y,z.
> Does anyone know how to do this?
?file.exists
__
[EMAIL PROTECTED] mailing list
https://www.stat.
> How do I "print" the "i" at each step?
print(i)?
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> Is there a function like "is.there" such that
> is.there ( a ) returns TRUE is object 'a' is in the current environment and
> FALSE otherwise?
exists()
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do
>I'm a new user to R and I am having difficulty reading a file into the
> program. Here's the error I keep getting, I bet there's a simple solution,
> but I cant find any...
> Error in file(file, "r") : unable to open connection
> In addition: Warning message:
> cannot open file `c:MikeWeat
> There is a method to install a package from a local file.
> From the unix command line, use
>R INSTALL
> possibly using
>R CMD build
> first.
Right.
I already do this within the function (I need to install the packages from
inside of R), but was going through trying to find redundant
On 13 Nov 2003, Peter Dalgaard wrote:
> I suppose the theory is that you might as well just run "R CMD
> INSTALL" on the file.
That's what I figured here, but wanted to be sure. I had found a block of
code of mine where I was basically reinventing the wheel installing local
packages and was wond
Hello ...
I see that on Windows one can specify a filename as the "pkgs" argument
and then set CRAN=NULL when calling install.packages() for a local
file. Is there a way to do this on unix? It doesn't appear to be
possible, but perhaps I am missing something here.
Also, if indeed there is no
> Hi. I Would like to know if it is possible to call R from C and how can I do
> it. There is any material about this or examples?
You'll want to read through the "Writing R Extensions" document at:
http://cran.r-project.org/manuals.html
-J
__
[EMAIL
In some code that I have written, use of url() is generating the output
line:
"cannot open: HTTP status was `404 Not Found`"
The problem is that I do not want R to be outputting any error messages -
I have 'internet.info' set to 3, show.error.messages set to FALSE and the
url() wrapped in a try()
> I want to write a function that modify directly variables passed as
> parameters (the equivalent in C language of *ptr/&ptr) so that I don't
> have to return a list and to reaffect all my variables. Is it possible
> to do so in R? Thanks a lot.
You can use environments as they're passed by refer
> If I want to "view source" on the rpois() function, for example, can I do
> somethink like:
>
> source(rpois)
>
> To see how the function is implemented?
Just type the name of the function
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz
> I'm trying to use the regexpr function to locate the decimal in a character
> string. Regardless of the position of the decimal, the function returns 1.
You need to escape it.
> gsub("\\.",",","Female.Alabama")
[1] "Female,Alabama"
__
[EMAIL PROTECT
> then everything works fine h, but I still have a problem as the
> command I really want to run is :
> source("http://wwwbioconductor.org/getBioC.R";)
> and source() does not accept an option 'method="wget"'
getBioC() accepts the 'method' parameter as per its documentation.
_
> I am documenting an analysis procedure in a DB and I would like to know the
> specific version number of each package that I use. Is there a standardized
> way of getting that information out from R, or should I parse it out from the
> source-code files? Ideally I would like a function like
ederal Inst. Technology, Switzerland.
Sandrine Dudoit, Division of Biostatistics, University of
California, Berkeley, USA.
Byron Ellis, Harvard Department of Statistics, USA.
Laurent Gautier, Technial University of Denmark, Denmark.
Robert Gentleman, Harvard Medical School, USA.
> Any clues? I just noticed that my e-mail filter rule suddenly stopped
> putting these messages in their respective folders this morning (my
> time).
I believe they're upgrading the Mailman software that runs the list.
__
[EMAIL PROTECTED] mailing lis
On Wed, 19 Feb 2003 [EMAIL PROTECTED] wrote:
> The following function:
> match(myvec,myscaler)!="NA"
> I need a return
> FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE ...FALSE
> Is there any function to perform this?
Try:
myvec == myscaler
> z <- c(24, 24, 10, 10, 10, 10, 44, 44, 44, 45
> * checking for CRLF line endings in C sources/headers ... OK
> * creating Davies-Ex.R ... OK
> * checking examples ... ERROR
> Running examples failed.
> r:Davies%
> How do I tell which .Rd file is the problem? (I suspect that the
> examples aren't actually being executed because most of them ta
On Thu, 23 Jan 2003, Saurav Pathak wrote:
> how may i load this file in R so that i may say at the prompt:
source("filename.R") should do the trick
__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
On Wed, 15 Jan 2003, chenwj wrote:
> is there any function can record the CPU time when running a paragraph of
> code?
system.time() should do what you want, I believe.
> if it is, can anyone show me an little example of how-to?
There are examples of usage in help("system.time")
-J
___
On Thu, 9 Jan 2003, David Kane I have read the suggested sections of the manual. It would seem to me that I
> should be able to continue to follow my prior practice by turning off the
> warning for missing INDEX. Certainly, the fact that R CMD build creates an
> INDEX for you if one is not presen
Hello ...
Does anyone know of a package (or other code) out there which has handled
S4 classes in C? I realize that a lot of this stuff is fairly new in
R-devel, so my assumption is no - but there seems to be some deviation
from the green book that is really throwing me off, and I'm looking for
s
> I need to write a R program that checks whether a file exists in the
> directory. Any easy ways
> to do that? Thanks!
file.exists()
__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> write an R function that writes references to Windows files into a text
> file, where a different Windows programs will later read these references
> in the standard Windows syntax.
>Can someone tell me how to create the character string
> 'c:\work\part1.txt' from the parts, "c:", "work", an
On Thu, 19 Dec 2002, Hilmar M. Carders wrote:
> Is there an R function that gives the equivalent of the UNIX command
> "uniq -c" which could be applied to a vector with duplicate values?
There must be a better way to do this, but this would get you the
information you're looking for:
> z <- c(
> When I look at the task manager, I see that the
> memory used by R keep going up and reach more than 1G
> byte after 700 iteration or so. I have try including
> gc after every loop. No help at all. I'll appreciate
> any suggestion.
Have you tried R1.6.1? I believe it fixes this problem.
-J
55 matches
Mail list logo