Dear all,
I use R version 2.15.1 on x86_64-pc-linux-gnu (64-bit).
I run a simulation where I have to call a series of R scripts in batch mode.
When I run the following two lines, this works well for PERIOD='17' but not for
PERIOD='08':
R CMD BATCH --no-save --args PERIOD='08' YEAR='203O'
The 'wierdness' is that 'R' is a domain of C messages and you are
trying to use it from R. How messages are massaged before being sent
for translation depends on the language, including how trailing spaces
are handled. There is no reason to expect domains intended for C
code to work in
On Sun, 3 Feb 2013, Lorenzo Isella wrote:
Dear All,
For a data mining project, I am relying heavily on the RandomForest and Party
packages.
Due to the large size of the data set, I have often memory problems (in
particular with the Party package; RandomForest seems to use less memory). I
Hello and Thanks in advance for your suggestions.
As a new member, I do not know exactly if such problem has ever been discussed
in this forum.
I need a small help using FactoMineR
and RcmdrPlugin.FactoMineR package to calculate weights for the
individual observational units. My data looks
Note that this is a Perl message (nothing to do with R), as the
message from gdata says pretty clearly.
Ask the gdata maintainer (see our posting guide) or on a Perl forum.
There are less restricted ways to read .xls files in R: XLConnect can
read this file, for example.
On Sun, 3 Feb 2013,
I have no problem specifying the mapping in both ggplot and various geom_*
functions. However, it is important to specify data and mapping parameter names
in the geom_* functions, particularly so because the parameter ordering is
different there.
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
Hi Ben,
let me suggest some background reading - Peter Dalgaard's or Phil
Spector's book will set you up with what you need. You can also read one
of the many free, contributed sets of notes kept on CRAN.
I hope that this helps
Andrew
On Mon, Feb 4, 2013 at 8:29 PM, Benjamin Gillespie
try this:
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)
DF - data.frame(a, b, c)
with(DF, tapply(c, list(a, b), sum))
I hope it helps.
Best,
Dimitris
On 2/4/2013 10:29 AM, Benjamin Gillespie wrote:
Hi guys,
I hope you
Hi Robert,
how about this?
tmp-read.table(text=ID Dx
Anausea
Adiabetes
Akidney_failure
Aheart_attack
Afever
Bfever
Bpneumonia
Bheart_attack
Bnausea
Bcough
Ckidney_failure
Cnausea
Cfoot_pain,header=T)
Here are some examples of data aggregation functions in R:
http://www.slideshare.net/djandrija/data-aggregation-in-r
http://www.psychwire.co.uk/2011/04/data-aggregation-in-r-plyr-sqldf-and-data-table/
Andrija
On Mon, Feb 4, 2013 at 10:29 AM, Benjamin Gillespie gy...@leeds.ac.ukwrote:
Hi
Dear list
# I have a function
ff - function(a,b=2,c=4){a+b+c}
# which I programmatically want to modify to a more specialized function in
which a is replaced by 1
ff1 - function(b=2,c=4){1+b+c}
# I do as follows:
vals - list(a=1)
(expr1 - as.expression(body(ff)))
expression({
a + b +
Hello,
First, don't use data for a data frame, as it is a R function.
Here is a way to do what you are looking for:
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)
dat=data.frame(a=a,b=b,c=c)
dat.sum - aggregate(c ~ a+b, dat,
Hi,
Is it what you are looking for?
ff - function(a,b,c){a+b+c}
ff(1,10,12)
[1] 23
ff(589,2,4)
[1] 595
HTH,
Pascal
Le 04/02/2013 19:00, Søren Højsgaard a écrit :
Dear list
# I have a function
ff - function(a,b=2,c=4){a+b+c}
# which I programmatically want to modify to a more
Thanks everyone - this seems to be the most efficient answer,
I'll do a bit of reading around too as suggested.
Thanks again,
Ben Gillespie
Research Postgraduate
School of Geography
University of Leeds
Leeds
LS2 9JT
From: D. Rizopoulos
No, this is not really what I want. But I have (later) realized that what I am
looking for can be achieved as shown below. I am just not sure how bullet-proof
the solution is. Suggestions are welcome!
Regards
Søren
--
specialize - function(ff, vals){
Hello,
In what follows, I've renamed the data.frame 'dat', 'data' already is an
R function.
xtabs(c ~ a + b, data = dat)
Hope this helps,
Rui Barradas
Em 04-02-2013 09:29, Benjamin Gillespie escreveu:
Hi guys,
I hope you can help me with this (probably) simple query:
I have a data
Hello,
I have a problem with ggplot and colors
I used this function to draw somes lines and I want them to be all black
(just to test)
however, I dont get any black line in the figure.
Do you have any experience with ggplot and manual colors??
ggplot(cmax, aes(cmax[,3],
We are happy to inform you that abstract submission for
useR! 2013 is now available online, see
http://www.R-project.org/useR-2013
This meeting of the R user community will take place at the University
of Castilla-La Mancha, Albacete, Spain, July 10-12, 2013. Pre-conference
tutorials
Hi Dave,
Thanks for your reply. I can't reproduce the last line of code your code.
The ifelse argument throws back an error saying it was not used.
A
On Fri, Feb 1, 2013 at 10:56 PM, David Winsemius dwinsem...@comcast.netwrote:
On Feb 1, 2013, at 9:30 AM, Alfredo Tello wrote:
Hi Folks!
On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote:
On 2/3/2013 11:21 PM, Pascal Oettli wrote:
Hello,
Do you have a 64-bit version of Java?
rJava says to you:
call: stop(No CurrentVersion entry in ', key, '! Try re-installing Java
and make sure R and Java have matching architectures.)
Hi,
fill is not the same as color. You need
scale_color_manual(values=c(black,
black , black, black, black, black, black, black, black,
black, black, black ))
although it is not clear why you are using aesthetic mapping to set
everything to black...
Best,
Ista
On Mon, Feb 4, 2013 at 6:17 AM,
Hi all!
I've uploaded two packages to CRAN via FTP [1] about a week ago, and
while one was promptly processed by Brian Ripley (thanks for that!), the
second got the .noemail extension added, and nothing else happened. So I
wonder whether CRAN maintainers are waiting for some action on my side
or
Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit :
On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote:
On 2/3/2013 11:21 PM, Pascal Oettli wrote:
Hello,
Do you have a 64-bit version of Java?
rJava says to you:
call: stop(No CurrentVersion entry in ', key, '! Try
On 2/3/2013 11:21 PM, Pascal Oettli wrote:
Hello,
Do you have a 64-bit version of Java?
rJava says to you:
call: stop(No CurrentVersion entry in ', key, '! Try re-installing
Java and make sure R and Java have matching architectures.)
I think I probably have a 32-bit version and not a
Dear Dennis and dear All,
It was probably not my best post.
I am running R on a Debian box (amd64 architecture) and that is why I
was surprised to see memory issues when dealing with a vector larger
than 1Gb. The memory is there, but probably it is not contiguous.
I will investigate into the
On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote:
Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit :
On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote:
On 2/3/2013 11:21 PM, Pascal Oettli wrote:
Hello,
Do you have a 64-bit version of Java?
rJava says to you:
call: stop(No
Just modified your code a bit, hope this helps:
a=expand.grid(1:2,1:2)
b=expand.grid(1:2,1:2,1:2)
c=expand.grid(1:2,1:2,1:2,1:2)
l.long-list(a,b,c)
mygrid-do.call(expand.grid,lapply(l.long,function(x) 1:nrow(x)))
out-vector(list,nrow(mygrid))
for(gridrow in 1:nrow(mygrid))
{
sum_rows=0
Thanks a lot, Pratap!
Dimitri
On Mon, Feb 4, 2013 at 9:43 AM, nalluri pratap pratap_s...@yahoo.co.inwrote:
Just modified your code a bit, hope this helps:
a=expand.grid(1:2,1:2)
b=expand.grid(1:2,1:2,1:2)
c=expand.grid(1:2,1:2,1:2,1:2)
l.long-list(a,b,c)
On Feb 4, 2013, at 10:27 AM, Spencer Graves wrote:
On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote:
Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit :
On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote:
On 2/3/2013 11:21 PM, Pascal Oettli wrote:
Hello,
Do you have a 64-bit
*Hi everyone, I am a new subscriber, so I hope I'm posting in the right way.
I need to load a hdf5 file, so I installed the hdf5 libraries ad the hdf5 R
package; in downloaded a small sample file from the hdf5 website and I
could correctly load it. But when I try to load my file:
*
require(hdf5)
What characteristics makes attribute great for kmeans clustering and how do
you measure these characteristics? Do you look at the distribution shape,
correlation matrix between attributes, pairs graphs, statistical tests...?
--
View this message in context:
Hi,
Try this:
library(reshape2)
dat1-read.table(text=ID Dx
A nausea
A diabetes
A kidney_failure
A heart_attack
A fever
B fever
B pneumonia
B heart_attack
B nausea
B cough
C kidney_failure
C nausea
C foot_pain,header=T,stringsAsFactors=F,sep=)
Hi,
library(reshape2)
dcast(DF,a~b,value.var=c,sum)
# a 1 2 3 4
#1 1 900 100 500 300
#2 2 300 900 200 100
A.K.
- Original Message -
From: Benjamin Gillespie gy...@leeds.ac.uk
To: r-help@r-project.org r-help@r-project.org
Cc:
Sent: Monday, February 4, 2013 4:29 AM
Subject: [R]
Am also having trouble with Rprof.
I am using on R 2.15.2 on the Mac (Platform: x86_64-apple-darwin9.8.0/x86_64
(64-bit)).
The example above without profiling takes around a minute to run:
z = 1
for (i in 1:1e8) z = z+1/i
z
[1] 19.9979
With profiling:
Rprof()
z = 1
for (i in 1:1e8)
Dear R experts,
I have the logarithms of 2 values:
log(a) = 1347
log(b) = 1351
And I am trying to solve this expression:
exp( ln(a) ) - exp( ln(0.1) + ln(b) )
But of course every time I try to exponentiate the log(a) or log(b)
values I get Inf. Are there any tricks I can use to get a real
*I'm sorry, in some way I didn't see I was in the wrong directory. *
*The real error message is the following:*
hdf5_global_verbosity=3 load=1
Processing object: DNS .. which is a Group
Processing object: BEAM .. its a dataset...Dataset has ID83886084
Dataset has tid 50331968
Dataset
Hello,
I have trouble with using data.frame data.
1. I loaded data using the following:
ff lt;- read.table(E:/R/VM/matrix.txt, header=T)
The data I used is attached.
I want to use at least 2 conditions for selecting of data. But I failed.
It works. -gt;
fff lt;- ff[ff$HG == GUEST,]
Hi,
Look at the help page for ?Logic, and in particular the section that
describes and |.
Best,
Ista
On Mon, Feb 4, 2013 at 9:01 AM, skpark birdfir...@naver.com wrote:
Hello,
I have trouble with using data.frame data.
1. I loaded data using the following:
ff lt;-
Hi,
I think you are looking for
as.data.frame(effect(value, mod))
Best,
Ista
On Tue, Jan 29, 2013 at 6:08 PM, Abraham Mathew abmathe...@gmail.com wrote:
I want to construct a logit model, plot the probability curve with the
confidence intervals, and then I want to
print out a data frame
qdap (Quantitative Discourse Analysis Package) is an R package designed to
assist in quantitative discourse analysis. The package stands as a bridge
between qualitative transcripts of dialogue and statistical analysis and
visualization.
This is the first CRAN release of qdap:
On Mon, Feb 4, 2013 at 5:00 AM, Søren Højsgaard sor...@math.aau.dk wrote:
Dear list
# I have a function
ff - function(a,b=2,c=4){a+b+c}
# which I programmatically want to modify to a more specialized function in
which a is replaced by 1
ff1 - function(b=2,c=4){1+b+c}
This a currying
Hello:
Googling for Wide characters in print led me to a discussion that
pushed me to review the read.table help page. Careful study there
suggested I try setting fileEncoding to something; it suggested I
look at the Encoding section in the help file for file. This
suggested that
On Fri, 1 Feb 2013, Rich Shepard wrote:
Running on Slackware here with R-2.15.2. There is a data frame I need to
edit to correct mis-spellings and to add a row. I used the edit() command
with emacs but could not find the mis-spelled strings nor figure out how to
add another row.
The
Could you be a little more explicit of what the error message is. On
my Windows system 32-bit, I get the following:
Rprof()
z - 1
system.time(for (i in 1:1e8) z - z + 1/i)
Error: cannot allocate vector of size 381.5 Mb
Which is probably due to trying to allocate 1e8 elements of integers
On Feb 4, 2013, at 4:00 AM, Alfredo Tello wrote:
Hi Dave,
Thanks for your reply. I can't reproduce the last line of code your code. The
ifelse argument throws back an error saying it was not used.
Did you look at your graphics window? On my machine the plot you asked for was
created by
Try this storing them to a list with the j,k,l,m as an index:
result - list()
for(j in 1:2){
for(k in 1:6){
for(l in 1:2){
for(m in 1:2){
fsumstatZINB=paste(/Users/chris/Dropbox/phd/analysis/Simulation/zinbmodels/summaries/zinbsumstat-,j,k,l,m,.rdata,
sep=)
load(fsumstatZINB)
Thanks Jim. That'll work for me!
Chris
On Mon, Feb 4, 2013 at 11:17 AM, jim holtman jholt...@gmail.com wrote:
Try this storing them to a list with the j,k,l,m as an index:
result - list()
for(j in 1:2){
for(k in 1:6){
for(l in 1:2){
for(m in 1:2){
On Feb 4, 2013, at 10:39 AM, Spencer Graves
spencer.gra...@structuremonitoring.com wrote:
Hello:
Googling for Wide characters in print led me to a discussion that
pushed me to review the read.table help page. Careful study there
suggested I try setting fileEncoding to
I have a large data frame (data1) that looks like:
A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20
[1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
[2,] 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0
[3,]
On 04.02.2013 14:17, Milan Bouchet-Valat wrote:
Hi all!
I've uploaded two packages to CRAN via FTP [1] about a week ago, and
while one was promptly processed by Brian Ripley (thanks for that!), the
second got the .noemail extension added, and nothing else happened. So I
wonder whether CRAN
I am tweaking an R package for which I have the source; the relevant code
is in R not C. I'm making changes to the package code.
What is the best workflow for doing this? I recall the advice used to be
to remove the NAMESPACE during development, but I don't think this is
possible anymore.
For
Le lundi 04 février 2013 à 18:58 +0100, Uwe Ligges a écrit :
On 04.02.2013 14:17, Milan Bouchet-Valat wrote:
Hi all!
I've uploaded two packages to CRAN via FTP [1] about a week ago, and
while one was promptly processed by Brian Ripley (thanks for that!), the
second got the .noemail
On Feb 4, 2013, at 9:48 AM, Steven Ranney wrote:
I have a large data frame (data1) that looks like:
A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20
[1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
[2,] 0 0 0 0 0 1 0 0 1
Hi Steven,
You are not indexing mA properly within the loop.
In order not to change the elements of the object, I'll create a new vector,
mA2 -not strictly necessary, though.
Let's start with an empty vector:
mA2 - rep(0,40)
Now, the loop with the correct indexing:
for(i in 1:40){
+ if(
Hello,
Try the following.
mA - sapply(seq_len(nrow(data1)), function(i) if(any(data1[i,] == 3))
meter[i, 1] else NA)
Hope this helps,
Rui Barradas
Em 04-02-2013 17:48, Steven Ranney escreveu:
I have a large data frame (data1) that looks like:
A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11
On 04/02/2013 12:59 PM, Ross Boylan wrote:
I am tweaking an R package for which I have the source; the relevant code
is in R not C. I'm making changes to the package code.
What is the best workflow for doing this? I recall the advice used to be
to remove the NAMESPACE during development, but
On Mon, Feb 4, 2013 at 6:23 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 04/02/2013 12:59 PM, Ross Boylan wrote:
I am tweaking an R package for which I have the source; the relevant code
is in R not C. I'm making changes to the package code.
What is the best workflow for doing
Hello,
Use a simple transfomation. Divide both t
log.a - 1347
log.b - 1351
tmp1 - exp(log.a - log(0.1) - log.b) - 1
result - tmp1 * exp(0.1 + log.b) # -Inf
Using base 10, the result would be
-4.405386507*10^585
a number too large for R. See the help page ?.Machine
Hope this helps,
Rui
Sorry, it should be:
Divide both terms by exp(log(0.1) + log.b) to give
tmp1 - exp(log.a - log(0.1) - log.b) - 1
result - tmp1 * exp(log(0.1) + log.b)
Rui Barradas
Em 04-02-2013 18:53, Rui Barradas escreveu:
Hello,
Use a simple transfomation. Divide both t
log.a - 1347
log.b - 1351
tmp1 -
On 04/02/2013 1:48 PM, Barry Rowlingson wrote:
On Mon, Feb 4, 2013 at 6:23 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 04/02/2013 12:59 PM, Ross Boylan wrote:
I am tweaking an R package for which I have the source; the relevant code
is in R not C. I'm making changes to the package
The bio.infer package contains a data frame
/usr/lib/R/library/bio.infer/data/itis.ttable.rda that needs to be modified.
After loading the bio.infer package and attaching the data frame with the
data() function, I wrote the data frame to a text file.
After adding another row to the data
Dear R users-
Do the lattice/latticeExtra packages support multiple tileplots with unique
colorkeys? I am trying to create a visualization of the encounter rate of
certain stocks of salmon across two years. The issue I am having is that
some stocks are encountered at much higher rates than
This will get you started
library(lattice)
library(latticeExtra)
D1 - data.frame(y=1:3, x=4:6)
D2 - data.frame(y=7:10, x=11:14)
T1 - xyplot(y ~ x, data=D1,
key=list(space=right, text=list(LETTERS[1:3],
col=c(red,green,blue
T2 - xyplot(y ~ x, data=D2,
On further thought, this might be better as it keeps the keys distinct
library(lattice)
library(latticeExtra)
D1 - data.frame(y=1:3, x=4:6)
D2 - data.frame(y=7:10, x=11:14)
T1 - xyplot(y ~ x, data=D1,
key=list(space=right, text=list(LETTERS[1:3],
col=c(red,green,blue
T2 -
Is it feasible to have both installed in a way that allows the
each version of R to select its own version of Java? A comment on
stackoverflow suggests that may not be easy
(http://stackoverflow.com/questions/5272216/is-it-possible-to-install-both-32bit-and-64bit-java-on-windows-7).
Dear Gabor,
Thanks for pointing me to this; didn't know the Curry function.
For what it is worth, the two approaches perform somewhat differently in terms
of computing time (my specialize function is given at the end):
library(functional)
## EXAMPLE 1
ff - function(a,b=2,c=4){a+b+c}
ff1 -
An often better approach is to use a function like with or within. These
allow you to run a command with your list (data frame, environment, etc.)
in the first position of the search list so they behave like they are in
the global environment (actually better because they temporarily mask
rather
There are 8 remaining seats on the following course:
Introduction to linear mixed effects modelling and GLMM course.
Where: Banff, Canada
When: 27-31 May, 2013
For details see the flyer at:
http://www.highstat.com/Courses/FlyerCanada2013.pdf
or: http://www.highstat.com/statscourse.htm
Kind
On 2/4/2013 7:03 AM, Simon Urbanek wrote:
On Feb 4, 2013, at 10:27 AM, Spencer Graves wrote:
On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote:
Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit :
On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote:
On 2/3/2013 11:21 PM, Pascal Oettli
On Feb 4, 2013, at 7:14 PM, Spencer Graves wrote:
On 2/4/2013 7:03 AM, Simon Urbanek wrote:
On Feb 4, 2013, at 10:27 AM, Spencer Graves wrote:
On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote:
Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit :
On Feb 4, 2013, at 6:33 AM,
What are good ways, within R, to download all files (perhaps including
folders/directories?) from an FTP site and then save these files to a local
hard drive? Is try(getURL) {RCurl} and save() the best functions to
utilize? Any other suggestions?
[[alternative HTML version deleted]]
Hi Anika,
Depending on your definition of within R, you might try
system(wget -r URL)
HTH,
Ista
On Mon, Feb 4, 2013 at 7:49 PM, Anika Masters anika.mast...@gmail.com wrote:
What are good ways, within R, to download all files (perhaps including
folders/directories?) from an FTP site and then
Hello,
I was wondering if there is any package with several metrics for cluster
estimation (estimating the k=2...10) (or evaluation..).
Also if instead of euclidean distance in k-means I use some other kind of
distance.. then for those evaluation metrics which takes into consideration
the
Hello,
I have a long list of x-, y- and z-data and try to generate a heatmap.
Obviously there are several data with identical x- and y-values. I get
the following error message:
Error in interp.old(x, y, z, xo = xo, yo = yo, ncp = 0, extrap = extrap, :
duplicate data points: need to set
Hello,
From ?interp.old
duplicate
character string indicating how to handle duplicate data points.
Possible values are
error
produces an error message,
strip
remove duplicate z values,
mean,median,user
calculate mean , median or user defined function (dupfun) of
76 matches
Mail list logo