Displaying 20 results from an estimated 6000 matches similar to: "Code to fetch summary info from vector"
2013 Apr 18
1
Statistical test for heteroscedasticity for an object of class "gls"
Hi there,
Does anyone know of a statistical test for heteroscedasticity for an object of class "gls"? (or alternative objective methods).
Thanks in advance,
Ben Gillespie, Research Postgraduate
o-------------------------------------------------------------------o
School of Geography, University of Leeds, Leeds, LS2 9JT
o-------------------------------o
http://www.geog.leeds.ac.uk/
2012 Sep 24
6
Script to count unique values from two linked matricies
I hope you can help with this one.
I have two matricies:
1. A species abundance matrix:
<http://r.789695.n4.nabble.com/file/n4643979/2species_matrix.jpg>
2. A species trait score matrix:
<http://r.789695.n4.nabble.com/file/n4643979/2trait_matrix.jpg>
The trait matrix lists trait scores for each species as listed in the
species abundance matrix.
I would like to create a script
2012 Sep 24
3
List creation based on matrix
Hi guys,
It would be great if you could help me with this one...
I'm looking to create a script to convert a matrix of species abundance e.g:
<http://r.789695.n4.nabble.com/file/n4643978/species_matrix.jpg>
into two vectors e.g:
<http://r.789695.n4.nabble.com/file/n4643978/communitylist.jpg>
----------------
If you feel there is no easy answer to this and that it would be
2013 Feb 04
6
Script for conditional sums of vectors
Hi guys,
I hope you can help me with this (probably) simple query:
I have a data frame:
--------------------------
a=c(1,1,1,1,1,1,2,2,2,2,2,2)
b=c(1,1,1,2,3,4,1,1,2,2,3,4)
c=c(400,200,300,100,500,300,200,100,500,400,200,100)
data=data.frame(a=a,b=b,c=c)
--------------------------
And I would like to get the following output:
--------------------------
b
a 1 2 3 4
1 900 100 500 300
2
2013 Mar 18
3
Superscript followed by number then superscript in text
Hi all,
I'm having problems finding the correct format for a command.
I would like to write some text on a plot.
I'm using the following command:
text(x,y,"text here", srt=90)
I would like the text to read:
capacity 10^3 m^3
(with ^ denoting superscript (i.e. each '3' as superscript).
I've tried fiddling around with expression(paste(etc.... to no avail. I
2004 Sep 07
6
Further png() question
Ok, I have reinstalled R-1.9.0 and this appears to have fixed the
problems I was having with png(). However, I have a further question
regarding png()
Is it possible to pass a par() argument to the png() command? I am
wanting to produce 4 plots per object, which I normally acheive on an X
window by par(mfrow=c(1,4)). I have tried calling a new plot and setting
par in this way but this has no
2005 Feb 16
4
Passing colnames to graphics title
Hi,
Just a quick query - if I'm creating a function to produce a number of
histograms per page of output (one per column from a matrix), how can I
pass the column name of the matrix into the title (or indeed to form part
of the x-axis label)?
TIA,
Laura
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44 113 343 1596
fax:
2006 Jan 28
3
Creating 3D Gaussian Plot
Hello,
I requested help a couple of weeks ago creating a dipole field in R but
receieved no responses. Eventually I opted to create a 3d sinusoidal plot
and concatenate this with its inverse as a means for a "next best"
situation. It seems that this isn't sufficient for my needs and I'm really
after creating a continuous 3d gaussian mesh with a "positive" and
2006 Jan 27
2
How do I "normalise" a power spectral density analysis?
Hi everyone
Can anyone tell me how I normalise a power spectral density (PSD) plot of a
periodical time-series. At present I get the graphical output of spectrum VS
frequency.
What I want to acheive is period VS spectrum? Are these the same things but the
x-axis scale needs transformed ?
Any help would be greatly appreciated
Tom
2004 Aug 15
3
Stacking Vectors/Dataframes
Hello,
Is there a simple way of stacking/merging two dataframes in R? I want to
stack them piece-wise, not simply add one whole dataframe to the bottom of
the other. I want to create as follows:
x.frame:
aX1 bX1 cX1 ... zX1
aX2 bX2 cX2 ... zX2
... ... ... ... ...
aX99 bX99 cX99 ... zX99
y.frame:
aY1 bY1 cY1 ... zY1
aY2 bY2 cY2 ... zY2
... ... ... ... ...
aY99 bY99 cY99 ...
2006 Feb 08
2
slightly off-topic re prcomp()
Hi,
I was wondering if anyone could tell me why prcomp() will "Invent" modes
of variation in a PCA on identical replicates of data? I would have
expected 50 (or whatever number) of identical replicates to return a null
score in such an analysis (or at the least, all variables would share the
same PC score). This is not the case and I was wondering could someone
point me in the direction
2005 Feb 02
2
Runnning R remotely
Hi,
I was wondering if anyone might be able to help. I am trying to run R on a
remote machine, part of the model run I am attempting writes an external
file output as a png (about 48 iterations per model run). I am running R
1.9.1 on SuSe9.0, and am accessing this via ssh from a Debian machine.
Initially I used the command ssh -X IP.address and whilst I was able to
run the model successfully the
2004 Nov 14
2
Exporting to file: passing source name to file name in loop
Hi,
I'm having a mental block as to how I can automatically assign filenames
to the output of the following code. I am wishing to create a separate
.png file for every image created, each of them having a sequential
filename ie "sourcefile_index.png" so that I can create a movie from
them.
Please could someone tell me where I am going wrong?
the following code works fine and
2007 Jun 04
1
R-squared in mixed-effects models
Hello,
I'm fitting general linear models using the function lme() from the package
nlme. My variables include a number of covariates and a single random factor,
because the experiment was laid out in blocks. I'd like to have a statistic to
measure the "proportion of explained variance" from my models. With ordinary
multiple regression I'd use R-squared, but I can't
2008 Apr 10
1
(no subject)
Subject: nls, step factor 0.000488281 reduced below 'minFactor' of
0.000976563
Hi there,
I'm trying to conduct nls regression using roughly the below code:
nls1 <- nls(y ~ a*(1-exp(-b*x^c)), start=list(a=a1,b=b1,c=c1))
I checked my start values by plotting the relationship etc. but I kept
getting an error message saying maximum iterations exceeded. I have
tried changing these
2006 Jan 22
3
White Noise
I'm wanting to create a series of near-identical matrices via the addition
of "white noise" to my starting matrix. Is there a function within R which
will allow me to do this?
Thank you
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44 113 343 1596
fax: +44 113 343 6716
mail: laura at env.leeds.ac.uk
2004 Oct 19
2
Slope of surface
Hi,
Is there a neat way of working out the slope of a flat surface in R?
Given (x,y,z) co-ordinates of the four corners of a square, is there a
function which will allow me to calculate the "mean" slope of the surface
in a given direction?
Thanks in advance..
Laura
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44
2007 Nov 27
1
Difference between AIC in GLM and GLS - not an R question
Hi,
I have fitted a model using a glm() approach and using a gls() approach
(but without correcting for spatially autocorrelated errors). I have
noticed that although these models are the same (as they should be), the
AIC value differs between glm() and gls(). Can anyone tell me why they
differ?
Thanks,
Geertje
~~~~
Geertje van der Heijden
PhD student
Tropical Ecology
School of Geography
2005 Mar 01
3
Reconstructing Datasets
Hi,
Is it possible to recreate "smoothed" data sets in R, by performing a PCA
and then reconstructing a data set from say the first 2/3 EOFs?
I've had a look in the help pages and don't seem to find anything
relevant.
Thanks in advance,
Laura
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
tel: +44 113 343 1596
2006 Feb 20
1
Further rgl()/spheres3d() query
Hi,
I am applying the following code to map pca loadings onto a 3d grid, my
problem is this - the output only plots the spheres in the requested color
(in this case "red") for the first argument. The sphere from the second
argument appear as flat dark circles. Also the text3d() command only seems
to work for a couple of the positions, with no text added in most cases.
Could anyone offer