Hi all,
Latex insists on placing tables in completely unreasonable places. How can I
tell it precisely where to place the table? I tried using specifiers like [!h]
but this doesn't help.
Any ideas?
Asif
OK, this happened to me again, this time while I was away at class. I saved all
my files so there was no damage, but do you think there's anything I can do to
fix/avoid the problem?
-Phillip.
----
Fatal error (1).
Your files have been auto-saved.
Use `M-x recover-session' to recover them.
If you have access to the PROBLEMS file that came with your
version of XEmacs, please check to see if your crash is described
there, as there may be a workaround available.
Otherwise, please report this bug by running the send-pr
script included with XEmacs, or selecting `Send Bug Report'
from the help menu.
As a last resort send ordinary email to `crashes(a)xemacs.org'.
*MAKE SURE* to include the information in the command
M-x describe-installation.
If at all possible, *please* try to obtain a C stack backtrace;
it will help us immensely in determining what went wrong.
To do this, locate the core file that was produced as a result
of this crash (it's usually called `core' and is located in the
directory in which you started the editor, or maybe in your home
directory), and type
gdb /usr/bin/xemacs core
then type `where' when the debugger prompt comes up.
(If you don't have GDB on your system, you might have DBX,
or XDB, or SDB. A similar procedure should work for all of
these. Ask your system administrator if you need more help.)
Lisp backtrace follows:
# (condition-case ... . error)
# (catch top-level ...)
Lisp backtrace follows:
# (condition-case ... . error)
# (catch top-level ...)
-------------------------------------------------
Phillip Y. Lipscy
Perkins Hall Room #129
35 Oxford Street
Cambridge, MA 02138
(617)493-4893
lipscy(a)fas.harvard.edu
Ph.D. Candidate
Harvard University, FAS, Department of Government
-------------------------------------------------
Thanks to Ryan and Gary...
But I'm really slow, so I'm still having problems. The new error message is
"Package natbib Warning: Empty 'thebibliography' environment in input line 3."
and
"Package natbib Warning: There were undefined citations."
Thanks in advance, Olivia
Hi, everyone.
I've gotten bibtex to work before, but this time, when I try "bibtex bibfilename" it gives me the error "I couldn't open file name 'bibfilename.aux'".
Any hints??
Thanks,
Olivia
I have mentioned in passing the usefulness of R-help --- the mailing list
associated with the R project. It is a marvelous resource. Any of you planning
to go on to GOV 2001 should consider signing up for the list (in digest
form). I learn something new almost everyday. You can find out about it here:
http://www.r-project.org/mail.html
Here is a question that was asked yesterday and the two answers (look familar?)
that appeared shortly thereafter.
Dave
------------------------------
Date: Mon, 18 Nov 2002 10:56:06 +0100
From: demolombe <demolomb(a)ensam.inra.fr>
Subject: [R] several functions in the same plot
Hello,
Is it possible to plot several functions on a same plot?
example: 3 functions : f(x), g(x), h(x)
I would like to obtain one graphic with x-axis and y-axis
and the 3 functions plotted to compare them.
Vincent
- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request(a)stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
------------------------------
Date: Mon, 18 Nov 2002 11:37:24 +0100
From: "vito muggeo" <vito.muggeo(a)giustizia.it>
Subject: Re: [R] several functions in the same plot
Use can use:
plot(f1,type="l",lty=1)
lines(f2,lty=2)
lines(f3,lty=3)
where f1, f2 and f3 are your functions.
best,
vito
- ----- Original Message -----
From: "demolombe" <demolomb(a)ensam.inra.fr>
To: <r-help(a)stat.math.ethz.ch>
Sent: Monday, November 18, 2002 10:56 AM
Subject: [R] several functions in the same plot
> Hello,
> Is it possible to plot several functions on a same plot?
> example: 3 functions : f(x), g(x), h(x)
> I would like to obtain one graphic with x-axis and y-axis
> and the 3 functions plotted to compare them.
> Vincent
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
- -.-.-
> r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request(a)stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request(a)stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
------------------------------
Date: Mon, 18 Nov 2002 08:01:25 -0500
From: "Liaw, Andy" <andy_liaw(a)merck.com>
Subject: RE: [R] several functions in the same plot
If the functions are all evaluated at the same set of x values, then you can
use something like:
matplot(x, cbind(fx, gx, hx), type="l")
where fx, gx and hx are the function values. The advantage of this over
plot() followed by lines() is that the limits on y-axis automatically
account for all three functions.
HTH,
Andy
- -----Original Message-----
From: demolombe [mailto:demolomb@ensam.inra.fr]
Sent: Monday, November 18, 2002 4:56 AM
To: r-help(a)stat.math.ethz.ch
Subject: [R] several functions in the same plot
Hello,
Is it possible to plot several functions on a same plot?
example: 3 functions : f(x), g(x), h(x)
I would like to obtain one graphic with x-axis and y-axis
and the 3 functions plotted to compare them.
Vincent
- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
- -.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request(a)stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
These are fine questions for the list.
Stanislav Markus writes:
> Hmm, so trying to select the votes from two years before a given year
> should look like:
>
> x$vote[x$year == x$year - 2]
>
> yet R refuses to go along :(
>
Not R's fault! Whenever you see behavior that you don't expect, you should break
the code into parts. In this case, you usage of x$year == x$year creates a
vector of TRUE's. You need to specify which year you want the data for two
years prior. Something like:
> x <- data.frame(year = 1988:1994, vote = 1:7)
> x
year vote
1 1988 1
2 1989 2
3 1990 3
4 1991 4
5 1992 5
6 1993 6
7 1994 7
> x$vote[x$year == 1992]
[1] 5
> x$vote[x$year == 1992 - 2]
[1] 3
> x <- data.frame(year = 1988:1994, vote = 11:17)
> x$vote[x$year == 1992]
[1] 15
> x$vote[x$year == 1992 - 2]
[1] 13
>
Although note that parantheses would make this code clearer and ensure that you
first subtract the 2 and then index the result.
Dave
>
>
> -----Original Message-----
> From: dkane(a)latte.harvard.edu [mailto:dkane@latte.harvard.edu]
> Sent: Wednesday, November 20, 2002 12:20 PM
> To: Stanislav Markus
> Cc: gov1000-list(a)fas.harvard.edu
> Subject: [gov1000-list] indexing a variable with value of other variable
> in dataframe
>
>
> Stanislav Markus writes:
> > If, for example, i have two columns, "year" and "vote", in the
> dataframe
> > "clean" - how do I select a vector of all votes for a given year?
> > Something like
> > clean$vote[year = 1980] ...?
>
> How about:
>
> > x <- data.frame(year = 1988:1994, vote = 1:7)
> > x
> year vote
> 1 1988 1
> 2 1989 2
> 3 1990 3
> 4 1991 4
> 5 1992 5
> 6 1993 6
> 7 1994 7
> > x$vote[x$year == 1992]
> [1] 5
> >
>
> Note the use of "==" as opposed to "=".
>
> Dave
>
> >
> > Thanks,
> > Stan
> >
> > _______________________________________________
> > gov1000-list mailing list
> > gov1000-list(a)fas.harvard.edu
> > http://www.fas.harvard.edu/mailman/listinfo/gov1000-list
> >
>
> --
> David Kane
> Lecturer In Government
> 617-563-0122
> dkane(a)latte.harvard.edu
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.fsf.org/philosophy/no-word-attachments.html
>
>
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
A perfectly fai question for the list.
Anna Lorien Nelson writes:
> Hey again, Dave,
>
> In HW 5, you pull out a coefficient from an lm.object using:
>
> > lm.obj$coeff["coeff.name"]
>
> Is there a similar command, something like
>
> > lm.obj$error["coeff.name"]
>
> to pull out an error term from the lm.object?
>
> (I've been trying to find the command by using help and just trying different
> possible command names, but no luck.)
In looking around for stuff like this, names() is a great command since it
shows you the different parts (and subparts) of the object that you are looking
at. unlist() can also be used, but can be confusing. I actually found the trick
above myself by poking around with names. Here is a session where I do the same
to find the error terms.
> test <- data.frame(y = rnorm(10), x.1 = rnorm(10), x.2 = rnorm(10))
> test
y x.1 x.2
1 1.13 1.39 -0.952
2 -1.58 -0.25 0.097
3 0.63 0.56 -0.971
4 0.61 1.50 0.602
5 -0.58 -0.48 0.020
6 -0.83 -0.41 -0.460
7 -0.44 0.29 0.577
8 -1.08 -0.83 0.391
9 -0.41 -1.14 1.502
10 -0.42 0.41 -2.613
> attach(test)
> lm.obj <- lm(y ~ x.1 + x.2)
> lm.obj
Call:
lm(formula = y ~ x.1 + x.2)
Coefficients:
(Intercept) x.1 x.2
-0.3664 0.7783 0.0808
> summary(lm.obj)
Call:
lm(formula = y ~ x.1 + x.2)
Residuals:
Min 1Q Median 3Q Max
-1.029 -0.223 -0.103 0.407 0.718
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.3664 0.1910 -1.92 0.097
x.1 0.7783 0.2429 3.20 0.015
x.2 0.0808 0.1892 0.43 0.682
Residual standard error: 0.6 on 7 degrees of freedom
Multiple R-Squared: 0.613, Adjusted R-squared: 0.502
F-statistic: 5.54 on 2 and 7 DF, p-value: 0.0361
> names(lm.obj)
[1] "coefficients" "residuals" "effects" "rank" "fitted.values" "assign" "qr" "df.residual" "xlevels"
[10] "call" "terms" "model"
> names(lm.obj$coefficients)
[1] "(Intercept)" "x.1" "x.2"
Poking around in here I didn't find the error terms.
> sum.lm.obj <- summary(lm.obj)
Note that summary returns an object with all sorts of interesting parts just
the way that lm does.
> names(sum.lm.obj)
[1] "call" "terms" "residuals" "coefficients" "sigma" "df" "r.squared" "adj.r.squared" "fstatistic"
[10] "cov.unscaled"
> names(sum.lm.obj$coefficients)
NULL
Hmmm. Where are those error terms?
> sum.lm.obj$coefficients
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.366 0.19 -1.92 0.097
x.1 0.778 0.24 3.20 0.015
x.2 0.081 0.19 0.43 0.682
> class(sum.lm.obj$coefficients)
[1] "matrix"
Ahhh. The coefficients, standard errors and other stuff are stored in a
matrix. SO, I need to use dimnames instead of names.
> dimnames(sum.lm.obj$coefficients)
[[1]]
[1] "(Intercept)" "x.1" "x.2"
[[2]]
[1] "Estimate" "Std. Error" "t value" "Pr(>|t|)"
Then it is easy to get the value that I want.
> sum.lm.obj$coefficients["x.1", "Std. Error"]
[1] 0.24
>
Dave
> Thanks,
>
> Anna
>
> --
> Anna Lorien Nelson
> Department of Government,
> Harvard University
> alnelson(a)fas.harvard.edu
>
>
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html