Displaying 20 results from an estimated 900 matches similar to: "Output from function to a tcltk window"
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
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 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
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 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
2005 May 30
1
Formatting numbers with a limited amount of digits consistently
I have tried to get signif, round and format to display numbers like
these consistently in a table, using e.g. signif(x,digits=3)
17.01
18.15
I want
17.0
18.2
Not
17
18.2
Why is the last digit stripped off in the case when it is zero!
Is this a "feature" of R or did I miss something?
---------------------------------------------
Henrik Andersson
Netherlands Institute of
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,
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.
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
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
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 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 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
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
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
2009 Jul 09
1
Changing text in a tkentry widget
I searched the web and the list archives for a solution to this, but
didn't see anything, so here goes. I'm new to tcltk. I'm trying to
change the contents of a tkentry widget when a button is pressed. Once I
get that working, the widget will be read only to the user. Here is some
toy code:
###############
require(tcltk)
thisEnv=environment()
tt<-tktoplevel()
Name <-
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
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.
2010 Jul 21
1
tcltk resizing when using tkgrid for layout
I've been able to figure out on my own how to do what I need in the
largely undocumented tcltk package, but I've finally hit a wall. I can't
even think of any sufficiently specific search terms to use for this.
I'm trying to make the widgets in my tk window resize when the window is
resized by clicking and dragging on its corners or edges. Instead they
stay exactly where they