We announce the availability of the Fortran 95 module For2R, which
makes it easy to write complicated R data structures (i.e., lists of
lists, matrices, dataframes, ...) from Fortran programs. By a series of
subroutine calls, program outputs can be written to a file readable by R
with a single
that this can be accomplished with
file.rename(paste(fn,.ps,sep=), paste(fn,.eps,sep=))
but saving directly would be more convenient.
Thanks for considering it.
...Mike Prager
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
You can use paste() with something like
formatC(number,digits=0,wid=3,flag=0)
(where number is your loop index) to generate the filenames.
Equipment maintenance,
on 9/22/2005 10:21 AM Leite,Walter said the following:
Dear R-Help members,
I have a question about how to save to the hard
Walter --
P.S. The advantage of using formatC over pasting the digits (1:1000)
directly is that when one uses leading zeroes, as in the formatC example
shown, the resulting filenames will sort into proper order.
...MHP
You can use paste() with something like
Recent R function names seem to be using CaseOfTheLetters to mark words
rather than dots as was done previously. Is the use of dots in function
names deprecated, or is that simply a style choice? Will function names
with dots cause problems in future revisions?
Mike Prager
on 9/30/2005 2:55 PM Peter Dalgaard said the following:
Mike Prager [EMAIL PROTECTED] writes:
Recent R function names seem to be using CaseOfTheLetters to mark words
rather than dots as was done previously. Is the use of dots in function
names deprecated, or is that simply a style choice
on 10/3/2005 3:31 PM Rolf Turner said the following:
[...] Does anyone know a
satisfactory solution to the problem of including a graphic which
exists in the form of a *.eps (encapsulated postscript) file into a
Word document. If so, would you be willing to share it with me and
my student?
and R users.
Hope that helps.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
specified x.obj. Can you run this procedure without mentioning
the module file?
I hope this helps.
MHP
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement
distribution suitable for Unix or Linux, but I doubt
that it does that particular trick.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R
On Sun, 10 Oct 2004, Fan wrote:
For occasional users, I would say, there's no worst thing than that:
you installed the new release, and soem of your existing codes no
longer work !
There is a close parallel here. On comp.lang.fortran, a frequent problem
is that existing code doesn't work
[...]How to save my work in current session as a nice
script?
again, I want to save objects as they are defined, not
numbers, other than copy / paste. I tried dump(), etc.
In another word, how do you work with R?[...]
Many people use the ESS (Emacs Speaks Statistics) package for Emacs or
XEmacs
At 10/14/2004 10:45 AM Thursday, you wrote:
[...]How to save my work in current session as a nice
script?
again, I want to save objects as they are defined, not
numbers, other than copy / paste. I tried dump(), etc.
In another word, how do you work with R?[...]
Many people use the ESS (Emacs
Scott,
Has anyone suggested yet that some options might need adjusting in the
Windows program that wrote the file? In my experience, CSV files from
Windows applications are typically pure ASCII (though yours clearly isn't).
Another possibility is that the program can export in plain ASCII with
At 11:09 AM 10/04/2004, you wrote:
Hi all
I'd like to create a grey palette for a filled.contour()
from blank (smallest values) to black (large values)
I have used somethig like this with bar plots:
colvec - gray(sqrt(seq(from=0.05, to=1.0, length=ncolor)))
That will save a color palette in colvec
Consider setting the environment variable R_USER=c:\Documents and
Settings\Giraudoux
MHP
At 08:55 AM 11/06/2004, you wrote:
Dear listers,
Moving from R 1.9.1 to R 2.0.0 today, it happens that the traditional
.RProfile (located in my home directory: C:\Documents and
Settings\Giraudoux) is not
You wouldn't find info on setting environment variables in the R FAQ
because environment variables are an operating system feature. Under
recent versions of Windows, environment variables are stored in the
Registry and can be set persistently through a dialog. In Windows XP, this
is found
This has been an interesting discussion. I make the following comment with
hesitation, since I have neither the time nor the ability to implement it
myself.
Using CLI software, an infrequent user has trouble remembering the known
functions needed and trouble finding new ones (especially as
At 11/18/2004 07:01 AM Thursday, Thomas Schönhoff wrote:
To sum up, what I am in need to is an extensive example based help-system,
focused on how to do things in R. In parts this is already there, i.e.
SimpleR from Verzani (contributed docs area) etc.
Hopefully I can contribute to this in
At 09:45 PM 11/18/2004, John Fox wrote:
[...]
6) As has been pointed out, e.g., by Duncan Murdoch, solving the
function-locating problem is best done by a method or methods that
automatically accommodate the growing and changing set of contributed
packages on CRAN. Why not, as previously has been
At 11/23/2004 11:45 AM Tuesday, Patrick Burns wrote:
...There could be an index builder that accepts a search phrase and
the function or package that is the successful answer to the search.
If this were open, then R users could contribute to the index who
don't feel qualified to submit code. It
An R program needs to accumulate a list (length unknown until done) of
objects. How efficiently and repeatedly can one append new objects to the
list?
I have been using something like
mylist[[length(mylist)+1]] = newobject
but I wonder if there is something better.
--
Michael Prager
NOAA
Tried to post this last night, but it doesn't seem to have appeared.
Using R 2.0.1 on Windows XP + SP2.
I am traveling, away from my usual references. I'm trying to make a
4-dimensional plot: a levelplot with overlaid contours, with different
response variables represented by (1) colors on the
I am using R 1.9.1 under Windows XP Professional.
Is there any R function that returns the filesystem path from which the
global environment (workspace) was loaded (and to which it will, by
default, be saved)? This seems identical with the current directory, so in
any given session it is not
into R or S-Plus.
My question is whether that format can be considered a safe one for
medium-term (say 10 years) data storage. Assuming R is still used then
(which I suppose will be true), will dget work with old files?
Thanks!
Mike Prager
__
[EMAIL
I am using R 1.9.1 under Windows XP Professional.
Is there any R function that returns the filesystem path from which the
global environment (workspace) was loaded (and to which it will, by
default, be saved)? This seems identical with the current directory, so
in any given session it is not
To follow up on my previous question, suppose a user R session wants to
unload one workspace and load another within an R session. Is the
following the correct sequence?
1. save.image() to save the current workspace as .Rdata in the current
working directory.
2. rm(list=ls()) to remove
At 7/15/2004 02:35 PM Thursday, you wrote:
Hello,
If I have a four column data set (with thousands of rows), that
doesn't have a header, how do I load in this text file, WITHOUT a row added
for naming(i.e. numbering the rows, 1 2 3 4 5..).
Also, if a row is added for naming, then
At 7/15/2004 03:23 PM Thursday, Andy Liaw wrote:
I've posted the following to R-help before. Hope it helps you.
cd - function(dir = tclvalue(tkchooseDirectory()), saveOld=FALSE,
loadNew=TRUE) {
stopifnot(require(tcltk))
flush.console()
if (saveOld)
To get better help, I suggest you specify--
1. How big is the data matrix (file)?
2. How as it created?
3. How are you reading it? (You might post the pertinent part of the R code)
At 06:16 PM 07/20/2004, Soyoko Umeno wrote:
Hi everyone,
I am having a problem reading my data file in R. It only
At 01:01 PM 08/25/2004, Raubertas, Richard wrote:
As long as the function to load a package is called *library*,
I think your campaign to change common usage is doomed to failure.
Yes, and it's also annoyingly hard to remember -- at least for those of us
who don't eat, sleep, and breathe R.
MHP
At 04:36 PM 08/25/2004, Peter Dalgaard wrote:
There's a good chance that R-2.x will introduce usePackage() and
eventually remove library() as a tool for loading packages.
That would be a welcome instance of consistency.
--
Michael Prager, Ph.D.[EMAIL PROTECTED]
NOAA Beaufort
Ted,
Have you tried bringing the eps files directly into Word? The version I am
using (Word 2002 = Word 10.x) can incorporate eps files and even generates
its own previews.
Maybe you don't need to make the conversion at all.
Regards,
...Mike
At 4/13/2005 04:36 AM, you wrote:
On 13-Apr-05 Prof
JGR users on Windows may be interested that Sun has released a preview
of its latest Java development kit and runtime engine at
http://www.java.net/download/jdk6/binaries/
This removes the main problem I have had with JGR and other Java
programs on Windows: poor font rendering. On Windows XP
its small part).
Mike Prager
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Paul, David A wrote:
I am one of only 5 or 6 people in my organization making the
effort to include R/Splus as an analysis tool in everyday work -
the rest of my colleagues use SAS exclusively.
Today, one of them made the assertion that he believes the
numerical algorithms in SAS are superior to
A similar problem was solved for me by re-installing the latest Windows
service pack.
Mike Prager
Sarah Lewis wrote:
I have downloaded a copy of Rgui for windows, but I am having
trouble visualising graphic imagines in this package. When I run
the demo : demo (graphics) the system crashes
I probably shouldn't suggest this, because I can't volunteer to implement
it. However, I bring it up in the hopes that if (1) others agree and (2)
the R core group think it a good idea that a suitable volunteer will come
forward.
I am finding that the flood of R email messages is becoming
At 7/14/2003 at 03:29 AM, Marc Vandemeulebroecke wrote:
Dear R programmers,
is there a sensible explanation for the following behaviour?
seq(0.7, 0.9, by=0.1) == 0.8
[1] FALSE FALSE FALSE
As Uwe Ligges pointed out, most floating point numbers are not exactly
representable in most bases.
At 05:16 AM 1/9/2004, allan clark wrote:
I would like to know if anybody knows of either a good book or web site
that explains one how to use Fortran. I would like to call some of the
Fortran subroutines but before I can do that I first want to learn how
to code in Fortran.
Interesting question.
On Wednesday 14 January 2004 19:57, Kristian Omland wrote:
[snip]
Is Excel's Solver an adequate tool for numerical approximation in general
and nonlinear regression in particular? Or should I push on writing
S-Plus code?
From what I've heard (and I know some expert users), Excel's solver is
At 02:19 PM 2/5/2004, Shoultz, Gerald wrote:
First . . . SUBSCRIBE (I want to subscribe to the list).
Second, I am trying to install R on windows XP. In looking at the
instruction manual I get the following:
The simplest way is to use 'rw1081.exe' or 'miniR.exe'. Just
double-click on the icon
The inquiry below and similar ones seem a lot like homework problems.
They are distinguished by showing no evidence of the OP's ever having
read a manual and also by being problems of apparently pedagogical
interest. The Fortran group (comp.lang.fortran) has a long tradition of
not giving
Cameron
Assuming DIST_TOW is a vector of the same length as effort and Gear, is
this what you mean?
effort[Gear==300] = DIST_TOW[Gear==300]*7412
MHP
on 11/21/2005 10:44 AM Guenther, Cameron said the following:
I am trying to great a new column of effort data from an existing vector
of
Your question is not quite clear. Do you mean write and read an R list
object to a file?
If so, one method is provided by
dget() and dput()
on 11/24/2005 12:16 PM Leaf Sun said the following:
I need to write and read a list in R. I did r.site.search, found there
is a package rmutil doing
...
}
} # end function
This is code that I would like to work not just now, but in
years to come.
Comments appreciated.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement
platforms?
Thanks!
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch
done.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
of the Fortran standards
committee being frequent contributors. It's a great resource.
HTH,
...Mike
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement
read as a list. We feel that
now we have the best of both worlds -- fast execution with ADMB,
followed by the programming ease and excellent graphics of R for
analysis of results and projections under numerous scenarios.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal
Michael McCulloch [EMAIL PROTECTED] wrote:
Hello,
I'm just beginning to learn R. What books/online learning modules with
datasets would you suggest?
Thank you!
Thomas Lumley has a nice introduction here:
http://faculty.washington.edu/tlumley/b514/R-fundamentals.pdf
--
Mike Prager, NOAA
Bert Gunter
Nonclinical Statistics
7-7374
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Prager
Sent: Wednesday, December 06, 2006 11:46 AM
To: r-help@stat.math.ethz.ch
Subject: Re: [R] Summary shows wrong maximum
I don't know about
the statement occurs, omit putting it into a figure
environment.
HTH,
--Mike
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help
?
This is slightly simpler than what you had:
names(frame)[which(names(frame) == cmlo3)] - col3
There are probably better ways still.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA
-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement
, please do NOT save again.\n)
ls() in
#===
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help
is considerably
easier to understand and maintain. The language is widely used
and is available on several platforms. The Python Web site
includes tutorials, and the download includes an IDE with an
interface to extensive help files.
http://www.python.org/
--
Mike Prager, NOAA, Beaufort, NC
(100,200,300).
any idea i can do it?
i appreciate any hint
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help@stat.math.ethz.ch
am hoping that for now, I can do this work
with traditional graphics.
Thanks!
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help
Mike Prager [EMAIL PROTECTED] wrote:
R 2.4.1 on Windows XP.
Question: In traditional graphics, is it possible to find out
the height of a line of text in units that can be used in
arithmetic and then in calls to text()?
[...]
I seem to have solved my own question by setting the user
, it suffices to test for approximate difference or
relative difference. The former would look like this
if (abs(x[1] - x[2]) eps)) ...
with eps set to something you think is an insignificant
difference, say 1.0e-10.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented
graphics history.
You can go through the history with PageUp and PageDown keys.
Within your function, you can call savePlot (q.v.) to save each
plot to a file just after it is generated.
HTH
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use
whose name is held in a character string. You can use
the assign() function to do that.
HTH.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement
result).
I am using elements of the returned vector to index the matrix.
e.g.,
nams - rownames(mymat)
for (thisnam in nams) {
myvec - mymat[thisnam, ]
# ... more code ...
}
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use
Mike Prager [EMAIL PROTECTED] wrote:
Gurus,
Can I rely on the rownames() function, when applied to a matrix,
always returning either NULL or an object of type character? It
seems that row names can be entered as integers, but as of now
(R 2.4.1 on Windows) the function returns character
?
This is going into a function, so I'm hoping for a method that doesn't
require looking at the plot first.
# sample code (simplified) #
mp - barplot(t(N.age), xlab = Year, axisnames = FALSE)
axis(side = 1, at = mp, labels = rownames(N.age), tcl = -0.75)
Thanks!
Mike Prager
NOAA, Beaufort
those where there is
no label?
This is going into a function, so I'm hoping for a method that doesn't
require looking at the plot first.
[...]
Mike Prager
NOAA, Beaufort, NC
Mike,
How about something like this:
mp - barplot(1:50, axisnames = FALSE)
# Create
() that is an especially
important distinction, since a tick is placed at every bar.
I just posted a solution that solves the problem for the range
of sizes that we expect to encounter. It gives much nicer
looking results in such cases than a solution without the extra
steps.
Mike
--
Mike Prager
[EMAIL PROTECTED] wrote:
Greg,
As far as I understand, SAS is more efficient handling large data
probably than S+/R. Do you have any idea why?
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA
environment.
I second the recommendation of Tinn-R. It is quite a good
editor, with many R-specific features (including sending R
lines, blocks, or files of code). It will be considerably
easier for your students to install and learn than Emacs.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions
Sebastian P. Luque [EMAIL PROTECTED] wrote:
I came across a case where there's a discrepancy between minimum and
maximum values reported by 'summary' and the 'min' and 'max' functions:
summary() rounds by default. Thus its reporting oddball values
is considered a feature, not a bug.
--
Mike
, there can be frequent
paging, and a SCSI subsystem will make a large difference in
computer response, at least under Windows. Unless your work is
processor bound, disk I/O is usually what sets the pace.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise
faster CPUs. One was my work machine, one my home. The
difference was not subtle. For another example, think of how
slow laptops seem when multitasking, compared to a good
workstation. It is usually the poor disk subsystem that's the
bottleneck, not the CPU.
Mike
--
Mike Prager, NOAA, Beaufort
) before
settling on the what you want to buy.
I hope that helps.
Mike
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help
://www.tcl.tk/man/tcl8.5/TkCmd/getOpenFile.htm
Hope that helps.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
__
R-help@stat.math.ethz.ch
75 matches
Mail list logo