Hi,
Searching the archives has brought no clue:
For a tex chunk in an Sweave text
Oracle query results: differences \Sexpr{varname},...
I need to change the string varname from X_1 to X\_1,
sub(_,??,X_+) - X\_1
so that subsequent Latex will generate X_1 (i.e. show the underscore)
instead
On 12/1/06, Thomas Petzoldt [EMAIL PROTECTED] wrote:
Hi,
lattice graphics work by utilizing so called panel functions. Here is a
working version of your example:
library(lattice)
x-rnorm(100)
plot.new()
densityplot(x,
panel=function(x, ...){
panel.densityplot(x, ...)
do.call(rbind,lapply(0:4,function(i){i+(1:5)}))
[,1] [,2] [,3] [,4] [,5]
[1,]12345
[2,]23456
[3,]34567
[4,]45678
[5,]56789
On 1 Dec 2006, at 00:32, Charles C. Berry wrote:
See
Dear R users,
Recenty i tried to install the R GUI of RKward, but i think something is
wrong. In installation, i used the command such like:
[EMAIL PROTECTED]:/usr/lib/rkward# ./configure --enable-R-shlib
or,
[EMAIL PROTECTED]:/usr/lib/rkward# ./configure --enable-R-shlib
Dear R-Users,
I used the box.tidwell () function of the car Package.
When I used the following formula:
semi.sub.in.mi1.boxtidwell_h-box.tidwell(RENT_LG ~ I(age+1)+I(age2+1)+X06A
+ I(X08B+1) + I(X22+1) + I(X24+1) + X31A, ~B_YEAR + C_X01 + C_X14 + C_X19 +
C_X29A +C_X21 + C_X23 + D_X12
You are confusing the printed representation with the string (a clue which
is all over the archives, and in ?regex).
X1 - sub(_,\\_,X_1,fixed=TRUE)
print(X1)
cat(X1, \n)
X2 - sub(_,_,X_1)
cat(X1, \n)
both do as you ask.
On Fri, 1 Dec 2006, Christian Hoffmann wrote:
Hi,
Searching the
Hi
is it possible to specify the shape of the point to be used in ggplot
(as with pch in plot)? I couldn't find anything in the help.
Thanks
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Department of Conservation Ecology and Entomology
University of
Hi
On 29 Nov 2006 at 10:26, David Kaplan wrote:
Date sent: Wed, 29 Nov 2006 10:26:32 -0600
From: David Kaplan [EMAIL PROTECTED]
To: Petr Pikal [EMAIL PROTECTED]
Copies to: r-help@stat.math.ethz.ch
Subject:Re: [R]
[ Resending to the list as I fell foul of the too many recipients rule ]
On Thu, 2006-11-30 at 11:34 -0600, Marc Schwartz wrote:
Thanks to Marc, Prof. Ripley, Sebastian and Sebastian (Luque - offline)
for your comments and suggestions.
I noticed that two of the vectors were named and so I
Thanks, a lot
I was not able to find it the hole day ...
Carmen
Phil Spector schrieb:
Carmen -
You certainly can write functions that use ..., but you need
to extract the arguments that the dots represent with list().
Here's a modified version of your function that may help explain
how
Gavin Simpson wrote:
[ Resending to the list as I fell foul of the too many recipients rule ]
On Thu, 2006-11-30 at 11:34 -0600, Marc Schwartz wrote:
Thanks to Marc, Prof. Ripley, Sebastian and Sebastian (Luque - offline)
for your comments and suggestions.
I noticed that two of the vectors
Dear All,
the following code, by courtesy of Jacques VESLOT, collates the
following contingency table from DATA (read in as df, sample listed
below)
led represents (court) cases,
jid the (justices) persons, and
vote is the binary state.
The command:
smat-t(apply(combinations(nlevels(df$jid),
On Fri, 2006-12-01 at 12:13 +0100, Peter Dalgaard wrote:
Gavin Simpson wrote:
snip /
I just don't understand what is going on with data.frame.
I think there is something about the data you're not telling us...
Yes, that I was doing something very, very silly that I thought would
work
David Barron [EMAIL PROTECTED] writes:
I'm not sure if this will help, but it's worth a try. Do the
regression as I suggested before, extract the model matrix and remove
the offending column. I'm assuming you don't know in advance how
many levels there are in the factor. Then use this to
Dear List,
the advent of multicore machines in the consumer segment makes me wonder
whether it would, at least in principle, be possible to divide a
computational task into more slave R processes running on the different
cores of the same processor, more or less in the way package SNOW would
do
Is it safe to call C code from R that mallocs memory for a structure,
returning a pointer to that structure via some 'raw()' parameter. Then,
pass that pointer to another C routine, and finally free the malloced
memory by passing the raw() data to another C routine?
I've written some code that
Millo Giovanni wrote:
Dear List,
the advent of multicore machines in the consumer segment makes me wonder
whether it would, at least in principle, be possible to divide a
computational task into more slave R processes running on the different
cores of the same processor, more or less in
Millo Giovanni wrote:
Dear List,
the advent of multicore machines in the consumer segment makes me wonder
whether it would, at least in principle, be possible to divide a
computational task into more slave R processes running on the different
cores of the same processor, more or less in the
On Friday 01 December 2006 13:23, Millo Giovanni wrote:
Dear List,
the advent of multicore machines in the consumer segment makes me wonder
whether it would, at least in principle, be possible to divide a
computational task into more slave R processes running on the different
cores of the
Isn't this a question clearly in R-devel's domain?
R-devel is intended for questions and discussion about code development
in R. Questions likely to prompt discussion unintelligible to
non-programmers should go to to R-devel.
The short answer is that quite a bit of code, e.g pwilcox and
Dear all,
The shapefile was generated with ArcGIS 9.0 running on Windows XP. It
can be can be found in www.uv.es/~abellan/districts_ok.zip.
Re running sessionInfo() before the error occurres as suggested by
Prof. Ripley:
library(spdep)
Loading required package: tripack
Loading required
I want to generate a bivariate time series data with given joint
distribution. Let's say
Yt = A + B*Yt-1 + Vt,
where Yt = (Y1t,Y2t)'. The dependence between Y1t and Y2t is measured by a
given copula function. I.e., C(F(Y1t), G(Y2t)) = H(Y1t,Y2t), where C is a
copula function, F and G are the
I have used the heckit function in micEcon.
...
How can I then get the AIC for this model?
It appears that the heckit $probit object is of class 'glm' and so, for
example:
main.result - heckit(whateveryouaredoing)# Do your heckit()...
probit.result - main.result$probit # The
On Thu, 2006-11-30 at 19:26 +, Gavin Simpson wrote:
On Thu, 2006-11-30 at 11:34 -0600, Marc Schwartz wrote:
Thanks to Marc, Prof. Ripley, Sebastian and Sebastian (Luque - offline)
for your comments and suggestions.
I noticed that two of the vectors were named and so I removed the names
On Fri, 1 Dec 2006, Juanjo Abellan wrote:
[...]
Sorry, I didn't understand the issue about the locale and the C locale that
Prof Ripley mentioned. Where could I learn about that?
In the R-admin manual (but Roger will understand).
--
Brian D. Ripley, [EMAIL PROTECTED]
Dear Simon,
It's hard to tell without the data and more information about the nature of
the variables, but I suspect that the program is running into numerical
difficulties because of a flat likelihood at the maximum. Is age2 by any
chance age^2? How is year (in either form) related to age?
I
Prof Brian Ripley wrote:
The short answer is that quite a bit of code, e.g pwilcox and RODBC,
does things like this. You don't need to pass the pointer back to R,
but if you do external pointers are designed for this job.
[reads a bit more of 'Writing R Extensions'...]
Right yes,
hi,
i'm trying to perform a clustering on a big dataframe the code is this:
print(load required R packages)
require(spgrass6)
require(cluster)
gmeta6 - gmeta6()
print(read in our 7 raster files from GRASS)
x - readFLOAT6sp(c
(er,crosc,longc,slope,profc,minic,maxic))
print(assemble a
Dear R-community,
I started using R to control yield and output from different factories by
production week. A typical example is below.
LocationWeek ShippedWafer SortedWafer UnsortedWafer
WaferYield GoodDie
A 479 4 5 0.476 -12
B
RSiteSearch(lme spatial correlation, functions) produced 10
hits for me just now. The sixth title on that list was spatial
correlation structure
(http://finzi.psych.upenn.edu/R/library/nlme/html/corSpher.html). This
is the help page for the corSpher function. The Examples section
Dear all,
## I have 4 tables like this:
satu - array(c(5,15,20,68,29,54,84,119), dim=c(2,4),
dimnames=list(c(Negative, Positive), c(Black,
Brown, Red, Blond)))
dua - array(c(50,105,30,8,29,25,84,9), dim=c(2,4),
dimnames=list(c(Negative, Positive), c(Black,
Look at the nws package, I have had success using it to parallelize
simulations using a couple of computers that were not being used at the
time. I don't have a multicore machine, but the examples in the package
make it look like using it for multicore would be even easier.
This is on windows
On Fri, 2006-12-01 at 18:02 +0100, Muhammad Subianto wrote:
Dear all,
## I have 4 tables like this:
satu - array(c(5,15,20,68,29,54,84,119), dim=c(2,4),
dimnames=list(c(Negative, Positive), c(Black,
Brown, Red, Blond)))
dua - array(c(50,105,30,8,29,25,84,9), dim=c(2,4),
Hi Hans,
The short answer is yes. I suspect you need to look at the 'by',
'tapply' or 'aggregate' functions, depending upon what your data type
is, exactly.
In general, it's best to come up with a really simple example which
illustrates the part you don't know how to do. If you can do
The gtools package also includes a function, 'running', which accomplishes
the desired task:
library(gtools)
t(running(1:5, width=3, fun=c))
[,1] [,2] [,3]
1:3123
2:4234
3:5345
On 11/30/06 8:56 PM, Marc Schwartz [EMAIL PROTECTED] wrote:
Here is
I have been using the hetcor function in the polycor package. When I
don't specify the use option everything runs smoothly. However, when I
specify use either as pairwise.complete.obs or complete.obs I get
this error
Error in optim(rho, f, control = control, hessian = TRUE, method =
BFGS) :
I have been using the hetcor function in the polycor package. When I don't
specify the use option everything runs smoothly. However, when I specify use
either as pairwise.complete.obs or complete.obs I get this error
Error in optim(rho, f, control = control, hessian = TRUE, method = BFGS) :
I have been using the hetcor function in the polycor package. When I
don't specify the use option everything runs smoothly. However, when I
specify use either as pairwise.complete.obs or complete.obs I get
this error
Error in optim(rho, f, control = control, hessian = TRUE, method =
BFGS) :
BaRow == Barry Rowlingson [EMAIL PROTECTED]
on Fri, 01 Dec 2006 14:09:13 + writes:
BaRow Prof Brian Ripley wrote:
The short answer is that quite a bit of code, e.g pwilcox
and RODBC, does things like this. You don't need to pass
the pointer back to R, but if you do
Céline Henzelin celine_appui at hotmail.com writes:
thank you for your answer i checked my code and it now works
One more question... do you know how to have an 3D histogramm from a known
matrix of probabilities
Cline
An RSiteSearch on 3d histogram will get you some answers,
as
Hi,
I have a very large dataset of 3008 individuals and 800 numerical variables.
In fact it is a table of 3008 36-monthes multivariated time series that I
would like to classify with an unsupervised algorithm
I had a look at the function kkmeans of e1071 package, which seems to be a
kernel
On 12/1/06, Marc Schwartz [EMAIL PROTECTED] wrote:
On Fri, 2006-12-01 at 18:02 +0100, Muhammad Subianto wrote:
Dear all,
## I have 4 tables like this:
satu - array(c(5,15,20,68,29,54,84,119), dim=c(2,4),
dimnames=list(c(Negative, Positive), c(Black,
Brown, Red,
Hi,
I'm a phd student of economics in Tunisia who is intersted now with the
seasonal unit roots test of Canova and Hansen. So I've installed the package
uroot in RGUI. I use R 2.4.0. The problem when I apply the function to my
data, I've always a message from RConsole that it is impossible to
On Fri, 1 Dec 2006 [EMAIL PROTECTED] wrote:
Hi, I'm a phd student of economics in Tunisia who is intersted now with
the seasonal unit roots test of Canova and Hansen. So I've installed the
package uroot in RGUI. I use R 2.4.0. The problem when I apply the
function to my data, I've always a
hi to all,
frustated for this error, to day i buy a 1 GB memory
slot for my laptop
now it have 1,28GB instead the old 512, but i've the
same error :-(
damn!damn!how can i do?
repeat for a little area (about 20X20 km and res=20m)
it work fine!
have you any suggestion?
is ther a method for look
Hi
The December 2006 issue of R News is now available on CRAN under the
Documentation/Newsletter link.
Paul
(on behalf of the R News Editorial Board)
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
[EMAIL
As I read it hectik() in micEcon does not fit by maximum likelihood, so
AIC is undefined. (People seem to have a magic faith in AIC as a
universal panacea, but it does come with a long list of conditions for
applicability.)
heckit's $probit is apparently only part of the fitting, but for any
I'm trying to track down a problem I'm having in the Zelig package and
have stumbled across a very odd difference in the method dispatch for
a derived S4 class.
Specifically, I have an object of class ZeligS4vglm, which is a
subclass of vglm and vlm respectively (these are from the VGAM
package).
Two missing things:
distances
[1] 13 14 10 11 2 4 6 1 3 9 8 12 7 5
#numbers correspond to rows in my_dataframe
my_dataframe
V2 V3 V4
V5 V6
ENSP0354687 35660.45 0.04794521 0.05479452
0.06849315 0.07534247
ENSP0355046
Dear Brendan,
That's curious, because the use argument to hetcor() works fine for me (see
below). Is it possible that you tried to use this argument without
specifying a data frame as the first argument to hetcor? If so, please see
?hetcor. If not, it would help to have an example.
I hope this
I have escaped Splus for Windows (mostly) and have started using
R (v 2.3.1 on i686 redhat). Installing packages has been routine except
for sp (classes and methods for spatial data). I get the following error
message
install.packages(sp)
Warning in
Yes, that's it.
hetcor(x1, x2, y1, y2)
hetcor(data, use=pairwise.complete.obs)
works but
hetcor(x1, x2, y1, y2, use=complete.obs)
hetcor(x1, x2, y1, y2, use=pairwise.complete.obs)
do not. Thanks very much!
Brendan
John Fox [EMAIL PROTECTED] 12/01/06 6:19 PM
Dear Brendan,
That's
Hello,
I am trying to plot lines in 3 dimensions from a multiple linear model
to illustrate the interaction of two of the explanatory variables. I'm
trying to use the cloud function (though I'm open to a different
function if an easier one exists). I keep getting the error message:
Error in
On 12/1/06, Michelle DePrenger-Levin [EMAIL PROTECTED] wrote:
Hello,
I am trying to plot lines in 3 dimensions from a multiple linear model
to illustrate the interaction of two of the explanatory variables. I'm
trying to use the cloud function (though I'm open to a different
function if an
Don McKenzie wrote:
I have escaped Splus for Windows (mostly) and have started using
R (v 2.3.1 on i686 redhat). Installing packages has been routine except
for sp (classes and methods for spatial data). I get the following error
message
install.packages(sp)
Warning in
A number of users have spotted a terminal problem with the 'debug' package
under R2.4.0, along the lines of
mtrace(x)
x()
Error in attr(value, row.names) - rlabs :
row names must be 'character' or 'integer', not 'double'
This arose from a bug in 'rbind.data.frame' in R2.4.0 itself. The bug
Unless I'm missing something, optimizing a linear function with
quadratic constraints is almost trivial with Langrange multipliers.
Maximize a'x subject to x'Ax=c.
S = Lagrange objective = a'x+lam*(x'Ax-c).
dS/dx = a + 2*lam*Ax.
Given lam, x1 = solve(A,
Dear All,
I have worked with R for some time. It's a great tool for data analysis. But
it's too hard to inputing raw data manually with R (I don't mean importing
data. R is good at importing data). Maybe it's not a focused topic in this
list, but I don't know other place where I can ask the
On 12/1/2006 11:00 PM, Wei-Wei Guo wrote:
Dear All,
I have worked with R for some time. It's a great tool for data analysis. But
it's too hard to inputing raw data manually with R (I don't mean importing
data. R is good at importing data). Maybe it's not a focused topic in this
list, but
One thing you did miss was the request in the posting guide to update to
the latest version of R before posting.
Note that it is the download that fails, not the installation. There is a
binary versioon of 'sp' for R 2.3.x on the CRAN master, so it looks like a
problem with the CRAN mirror
Sorry, I missed that 'i686 redhat' might mean Red Hat, that is a form of
Linux. The advice in the first para applies: the current version of 'sp'
in the source area on CRAN is for R=2.4.0: see
http://cran.r-project.org/src/contrib/Descriptions/sp.html
If you cannot update your R, there are
61 matches
Mail list logo