Displaying 20 results from an estimated 3000 matches similar to: "how do R calculates the number of intervals between tick-marks"
2010 Oct 21
1
printing a variable during a loop
Hello,
About looping, consider the example:
for (i in 1:23194) {
dat.stat[i,c(2:8)]<-quantile(dat.bat[BL==block[i],2],prob=c(0,0.025,0.25,0.5,0.75,0.975,1))
print(i)
}
I'd like to have the value of "i" printed for each loop (step). As I
could see the values of "i" are shown on screen only after all the
work is done.
Thanks in advance for any suggestion.
Best
2010 Sep 10
1
adding labels above bars in a barplot
Hello,
I want to make a general routine to draw barplots with numbers plotted
above each bar. See the example below.
I could not place the numbers on the middle of each bar because I
could not calculate the right position of each x-axis tick. axTicks(1)
indicated a unitary step, but it does not seem work.
I appreciate any help or suggestions.
Best regards,
Antonio Olinto
2006 Aug 07
2
finding x values to meet a y
Hi,
I'd like to find which values of x will give me a y.
In other words, in the example of a gaussian curve, I want to find the values of
x that will give me a density, let's say, of 0.02.
curve(((1/(sqrt(2*pi)*10))*exp(-((x-50)^2)/(2*10^2))),xlim=c(0,100))
Thanks for any help,
Antonio Olinto
-------------------------------------------------
WebMail Bignet - O seu provedor do
2009 Jun 15
4
books on Time series
Dear list fellows,
I want to study time series and use R to analyse time series of fishing
data from several species (landings and cpue) investigating the
correlation between them and with environmental factors (water
temperature, wind, etc.).
Searching at Amazon I found three books with examples in R:
Time Series Analysis: With Applications in R by Jonathan D. Cryer and
Jonathan D. Cryer
2006 Mar 15
1
filtering in aggregate
Hello all,
I have a data frame with year, month, species, fishing gear and catch
(Y, M, S, F, C) and I want the sum of C by Y for species "A" and fishing
gear "trawl".
I tried things like aggregate(C[S=="A" & F=="trawl"], list (Year =
Y[S=="A" & F=="trawl"]), fun=sum), but it didn't worked.
To overcome this problem I did
2004 Apr 25
2
nonparametric multiple sample comparison
Hello all,
Here goes one of my first functions.
I want to make a nonparametric multiple sample comparison with unequal sample
sizes (see Zar?s Biostatistical Analysis, 3rd. Ed., pg. 201 Example 10.11, pg.
288 Example 11.10). In the real world, I want to compare samples of fish
length captured with different fishing gears.
After using the Kruskal-Wallis test I want to check the differences
2001 Sep 23
1
plot and lm (2)
Thanks for your reply Nassar.
What I really want is to overlay (like add=TRUE) the plots 1 and 2. With
plots "at the same screen" I meant overlaid and not one beside the other,
i.e., only one plot with all the points (1 to 10) in blue (or any other
color), the points 5 to 9 in red and a regression line from points 5 to 9.
Best regards,
Antonio Olinto
----- Original Message -----
2004 May 19
3
greek letters in plots
Hi,
I want to write in x axis label "fitted value of lambda" (lambda in greek
letter).
xlab=expression(lambda) gives the "lambda", I tryed things like xlab=paste
("fitted value of ", expression(lambda)) but I didn't get the greek letter.
Thanks in advance for any hint.
Antonio Olinto
-------------------------------------------------
WebMail Bignet - O seu
2004 Dec 06
1
using subset
Hi,
I have doubts in using subset command. I have a list of, lets say, 15 species
and I want to make a subset with only 2 of them. I??m the command
data2 <- subset(data1, species=="sp1"|species=="sp2")
Nevertheless, when I ask for the summary (summary(data2)) the others species
names still apearing. Also I tried
data2<-data1(data1$species %in%
2001 Sep 07
3
fitting models with gnls
Dear R-list members,
Some months ago I wrote a message on the usage of gnls (nlme library) and here I come again.
Let me give an example:
I have a 10 year length-at-age data set of 10 fishes (see growth.dat at the end of this message) and I want to fit a von Bertalanffy growth model, Li= Linf*(1-exp(-k*(ti-t0))) where Li = length at age i, Linf= asymptotic length, k= curvature parameter, ti=
2001 Sep 11
2
data frames
Dear R-list members
Here goes a question on data frames:
I want to create a new data frame excluding some records
(rows) from an existing one.
Considering the data frame "fish.dat" at the end of this
message, I can make a boxplot(Ring~Radius) and identify the
points at rows 11 and 25 as outliers.
With the command fish.dat[c(11, 25),] I can identify which
fishes are related to
2001 Sep 25
2
max-min plot
Hello R-list members,
I’m trying to make a min-avg-max plot (like a boxplot, without
box and outliers, i.e., for each class of "x" a vertical line
indicating the range (max-min) and an horizontal line or point
indicating the mean) with data like:
Year Avg Min Max
98 10 7 13
99 12 10 15
01 11 6 14
Which command should be used?
Many thanks,
Antonio Olinto
2002 Jan 19
2
comma as decimal separator in plots
Hi,
Some time ago I asked about how to use comma as decimal separator in plots
and Mr. Paul Murrell wrote:
-------
You could try something with axis() and chartr(), like ...
par(mfrow=c(2,1))
plot(1:10/11, rep(1, 10), main="Standard X-Axis")
plot(1:10/11, rep(1, 10), main="Customised X-Axis", axes=F)
axis(1, at=pretty(1:10/11),
2001 Mar 28
4
fitting growth curves
Dear R-list members,
Cynthia M. Jones wrote a paper (Fitting growth curves to retrospective
size-at-age data, Fisheries Research 46(2000):123-129; abstract at
http://www.elsevier.nl/gej-ng/10/19/44/70/24/37/abstract.html)where the
SAS procedure MIXED, Macro NLINMIX (Littell et. al., 1996)was used to
estimate the von Bertalanffy growth function parameters assuming that
data from the same fish are
2003 Dec 11
2
returning plot tick marks
Is there an easy way to return the values of the axis tick marks resulting from plot.default? For example, plot(1:1000) would return 0, 200, 400, 600, 800, 1000 from the x axis.
Thanks,
Max
---------------------------------
[[alternative HTML version deleted]]
2001 Nov 09
2
ks.test
Dear R-List members,
I want to check if a set of measurements follows better a
gamma or a lognormal distribution (see data below).
Using shapiro.test I can test for normality (shapiro.test(log
(Lt)).
To test for gamma (and normal) distribution I would use
ks.test but I need to specify its shape and scale. How should
I calculate these values in R?
I tried
> Lt.fit <- glm(Lt ~ 1,
2000 Nov 05
3
glm
Hi to all,
So I'm also a new user. I downloaded the program last week and I think it's great. Thanks to those who have developed R.
I have a special interest in GLM as a tool to describe fisheries and its variables and I'm just begging to study it.
As I could understand there's two types of GLM sun of squares: in "type I" the factors are added in sequence and
2004 Jun 18
1
cross table
Hi,
I have a dataframe with 3 columns: month (1 to 12), length and length class.
I'm trying to make a cross table with the counts of lengths per length class
and month. I don??t have all classes per month.
| 1 2 3 ...
-------------
120 | 0 1 0
150 | 5 6 0
170 | 3 0 7
...
I have already tryed many commands, without success - unfortunately.
May someone help me? Thanks in advance!
2010 Aug 24
1
tick marks on both sides of axis
hello,
all my attempts to get a plot with tick marks on both sides of axis failed -
can someone please help me with this?
thanks,
kay
-----
------------------------
Kay Cichini
Postgraduate student
Institute of Botany
Univ. of Innsbruck
------------------------
--
View this message in context: http://r.789695.n4.nabble.com/tick-marks-on-both-sides-of-axis-tp2336668p2336668.html
Sent from the
2005 Nov 24
1
model selection with step function
Hello,
I have a doubt in using the function step (step wise) to select glm models.
Usually I apply the gamma distribution to analyze fishery data. To select the
terms I use a routine where I first compare single term models to the null model
(eg. U~1 vs. U~depth; U~1 vs. U~latitude; etc. ? where U= abundance) and, by
means of the result given by a likelihook function applied for each comparison,