Displaying 20 results from an estimated 1000 matches similar to: "Formatting numbers with a limited amount of digits consistently"
2005 Dec 02
2
Seven month time-series sampled at hourly intervals
I have data from several sensors that recorded data at hourly intervals
during seven months. I want to separate daily variation from the trend,
and also be able to zoom in on only one month of data.
I have not been able what functions to use, I can not figure out from
the help for 'ts' how to use hourly data.
I guess this is routine-work for a lot of people so I hope someone can
2004 Mar 02
1
R programming
I have been using R for a few months to plot my data, and fit
statistical models and so on.
It is stated that R is not only a package for statistcs and graphics but
also a programming language.
Currently I am working with Fortran 90 to do numerical simulations (1D
reactive -transport), and subsequently visualize it in some external
software (spreadsheet). As I now started using R I will plot my
2004 Nov 23
2
Create a vector of combinations based on a table column names
I want to create a character vector based on the table (shortened for
display) below:
Where there are ones in the matrix I want the column name to appear and
where there are zeros nothing, which would make the vector in this
shortened case:
combinations <- ("A B","A C","A E H","A F G","B C D","E G H",A C D E
H","A C D F
2004 May 18
7
Isotopic notation in plots
I really like to use R for all my graphs, and as I work with stable
isotopes I want to have a proper chemical notation in my plots
I have looked at ?plotmath, but didn't find the answer and also searched
the R website.
------------------------------------------------------------------------
--
plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript with
nothing in front, but it
2004 Oct 07
1
confidence interval for nls
Do I have the right impression that it's currently not possible to
produce confidence intervals for the nls predictions using R?
I had a course were we used SAS PROC nlin and there you could get
intervals for the parameters and the prediction but I do not have access
to SAS.
Would it be difficult to implement, I tried to dig into the help pages
of nls, vcov and nlsModel but I could not
2005 Feb 04
1
Output from function to a tcltk window
I would like to display output to a tcltk window from e.g. a call to
summary().
I tried to get something else than oneliners into a text window of the
kind found at:
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/TextWindows.html
But without success.
Henrik
-------------------------------------------------------------
Henrik Andersson
Netherlands Institute of Ecology -
Centre for
2005 Dec 22
1
strsplit with dataframes
Hello fellow R people,
I can not figure out a pretty way to use strplit with vectors
Imagine that I got the following data from someone with ID's
representing several factors
ID data
A1-B1-t1 0
A1-B1-t2 1
A1-B2-t1 5
A1-B2-t2 10
A1-B10-t1 0
A1-B10-t2 1
A1-B20-t1 5
A1-B20-t2 10
...
I would like to turn this dataframe to
station substation time data
A1 B1 t1 0
A1 B1 t2 1
A1 B2 t1 5
2005 Jan 13
1
Setting the width and height of a Sweave figure
Hello R-people,
I have a function which plots two figures next to each other
using if(dev.cur()==1) x11(width=14,height=7) to create a new window
and set the size of the window automatically if no device is open.
This works fine in interactive mode but I don't know how Sweave gets the
parameters for the figures, and right now the default behavior causes
this figure to be square and the
2004 Dec 06
4
Modyfing PATH in Windows Installer for R
Just a small suggestion since Windows have a file system not designed
for command line use...
Would it be possible to add the possibility of automatically
adding/modifying the path to the R executables in the windows installer
program?
---------------------------------------------
Henrik Andersson
Netherlands Institute of Ecology -
Centre for Estuarine and Marine Ecology
P.O. Box 140
4400 AC
2004 Aug 30
1
axes=F with pairs()
If I want to fiddle with the axes, I normally plot things like this for
instance
plot(1:5,axes=F)
axis(2,labels=letters[1:5])
BUT, if I want to do remove the axes from a scatter plot matrix using i.e.
pairs(cbind(runif(10),runif(10)),axes=F)
I get
Error in plot.default(x[, j], x[, i], xlab = "", ylab = "", axes =
FALSE, :
formal argument "axes" matched by
2004 Oct 21
1
Arrow heads at the end of axes
I would like to have arrow heads at the end of my axes, since I am
plotting variable where the absolute amount is irrelevant, there is not
supposed to be numbers on the axes.
An imperfect example:
plot(rnorm(10),bty='l',xaxt='n',yaxt='n',ylab='',xlab='',type='l')
abline(h=0)
Like this but without, the xaxis and with arrrowheads
More like this in
2005 Sep 14
1
Long lines with Sweave
I have used Sweave a lot the latest year, but never really used any long
function calls.
If I have code which look like this
-------------------------------------------------------------
gof <- benthic.flux(ID="Gulf of Finland",
meas.conc=conc,
bw.conc=bw.conc,
time=times,
2005 Jul 26
5
Plot zooming i.e. changing ylim according to xlim
Dear R-gurus,
I would like to zoom in a plot, e.g. I select a region on the x-axis and
then I would like the ranges on the y-axis to change accordingly.
Is it possible to do this with existing functions, or do I have to
invent some data selection before plotting?
See below a short example, where I select ylim with trial and error,
which I want to avoid.
Cheers, Henrik Andersson
2004 Nov 23
0
Create a vector of combinations based on a table column n ames
Here's another way:
> dat <- read.table("clipboard", header=TRUE)[,-(1:3)]
> dat
A B C D E F G H
1 1 1 0 0 0 0 0 0
2 1 0 1 0 0 0 0 0
3 1 0 0 0 1 0 0 1
4 1 0 0 0 0 1 1 0
5 0 1 1 1 0 0 0 0
6 0 0 1 0 1 0 1 1
7 0 0 0 1 1 1 0 1
8 1 0 1 1 1 0 0 1
9 1 0 1 1 0 1 1 0
> apply(dat > 0, 1, function(idx) paste(names(dat)[idx], collapse=" "))
1 2
2004 Oct 25
2
Reading sections of data files based on pattern matching
I am about to write general functions to read the output of simulations
models.
These model generate output files with different sections which I want
to analyze plot etc.
Since this will be used many people at the department I wanted to make
sure that will do this in the best way.
For instance I want to read a snippets of data from a text that look
like this.
2003 Dec 02
1
Two axes with different scales
Hello I would like to make a graph with two variables, with different units,
so I would like to have two y-axes, one on the left and one on the right
with different scales. Is this possible?
I have searched through all the documentation I could find on the R homepage
without luck and I like R very much and would rather not resort to using
something like SigmaPlot for this seemingly simple thing.
2004 Feb 23
1
Reference to use of MLR in industry and biology
I apologize in advance for posting a question not related to R.
I need references to papers that use multiple linear regression in an industrial application and also in a biological experiment.
This is aimed to biologists/chemists (non-statisticans) so if anyone has written a brilliant paper where the use of multiple regression is important and also understandable to people with little
2005 Nov 14
1
(no subject)
Hi,
I am trying to solve a model that consists of rather stiff ODEs in R.
I use the package ODEsolve (lsoda) to solve these ODEs.
To speed up the integration, the jacobian is also specified.
Basically, the model is a one-dimensional advection-diffusion problem,
and thus the jacobian is a tridiagonal matrix.
The size of this jacobian is 100*100.
In the original package
2006 Oct 27
0
problem with applying regul function (pastecs)
Hi,
I'm trying to analyse some time series data on dissolved organic
nitrogen. Because it has gaps in it, I try to interpolate (linear) with
the regul method from the pastecs package.
I have a number of stations with measurement series in a matrix
constructed from a data frame with the unstack method (temp)
I also used the unstack method to make a similar matrix for the time
points
2005 Jan 26
3
plot function
Hello,
how can use change the plot function to change the range of axises. I want my graph from a certain range [a, b], instead of from the min to max of of datas?
if i want draw a line instead of dots, should i use both plot and lines function.
for example:
plot(x, y);
lines(x, y);
things seem not working if i only use lines(x, y).
Thank you so much.
Cuichang Zhao
Jan 25, 2005