Hi
Did you try what I had suggested? In what aspect it does not fulfil your
request?
Petr
From: dila radi [mailto:dilarad...@gmail.com]
Sent: Friday, February 28, 2014 9:25 AM
To: PIKAL Petr
Subject: Re: [R] Data Rearrangement
Dear Petr,
Im so sorry for the inconvenience caused by the data.
Dear all,
Does anyone have a PDF of the classic OrchardSprays reference
(data(OrchardSprays)):
C. G. Butler, D. J. Finney, P. Schiele (1943) Experiments on the poisoning of
honeybees by
insecticidal and fungicidal sprays used in orchards. Ann Appl Biol
30:143–150.
Thanks very much and best
David:
Oh yes! That is certainly the right way. Much better than what I suggested.
I actually first thought about doing this, but didn't get the form
right (I wanted to substitute within the expression, rather than
substituting the whole expression).Of course,one can always use
bquote() instead
Dear R users
I want to paint parts of a polygon with different colours conditional
to values of the variable.
Example:
f-seq(1,33)
g-sin(f)
i-rep(0,33)
ff-c(f,rev(f))
gg-c(g,rev(i))
plot(ff,gg,type=n)
polygon(ff,gg,col=2) # but I wanted to plot areas below and above the
x-axis with different
e.g. this doesn't work:
vectorA = c( bquote(TNF-*alpha), bquote(IFN-*gamma) )
for(ii in vectorA) {
plot(0:1,0:1)
title(main = paste(asdfsadf,ii))
}
Use bquote's .() operator in the call to plot() or title(), as in:
par(mfrow=c(2,1))
for(ii in vectorA) {
The simplest way is to use clip():
clip(0, 33, -1, 0)
polygon(ff,gg,col=2)
clip(0, 33, 0, 1)
polygon(ff,gg,col=4)
-
David L Carlson
Department of Anthropology
Texas AM University
College Station, TX 77840-4352
-Original Message-
From:
Dear all,
I estimate a logit model with the function glm and I have estimation not
convergent. Is it possible to increase the maximal number of iterartion in the
function glm? Or any other suggestion? Thanks!
Mei-Yuan Chen
Department of Finance
National Chung Hsing University
Taichung,
Dear all,
I would like some advices on R packages to solve classification problems.
I have tried to search among the Task views, but couldn't find anything.
Can somebody recommend me some packages?
Some of the features I am looking for:
- deal with multiple classes
- use customized cost
Focus on MASS, CCA and e1071 packages
Brgds,
Sergio
Il 28/feb/2014 17:47 Luca Cerone luca.cer...@gmail.com ha scritto:
Dear all,
I would like some advices on R packages to solve classification problems.
I have tried to search among the Task views, but couldn't find anything.
Can somebody
Do you mean supervised or unsupervised classification.
If supervised, I have had great success using gradient boosted
classification in package gbm. multinomial distribution will get you
multiple classes and it will select relevant predictors by itself
given the training data.
Not sure about the
You actually want cast() from the reshape package, not melt().
I would recommend using dcast() from reshape2, the newer version of reshape.
Jean-Olivier Irisson
—
Université Pierre et Marie Curie
Laboratoire d'Océanographie de Villefranche
181 Chemin du Lazaret 06230 Villefranche-sur-Mer
Tel: +33
Thanks for the advices Sergio and Jean-Olivier.
Of course I forgot, but I am interested in supervised classification!
I'll go through the packages you suggested to me!
Any ideas for Neural Networks and Random Forests instead?
Luca Cerone
Tel: +34 692 06 71 28
Skype: luca.cerone
On Fri, Feb 28,
On 28/02/2014 16:07, mei_yuan wrote:
Dear all,
I estimate a logit model with the function glm and I have estimation not
convergent. Is it possible to increase the maximal number of iterartion in the
function glm? Or any other suggestion? Thanks!
Yes. See the help page, which refers you to
http://cran.r-project.org/web/views/MachineLearning.html for a task view
you missed.
On 28/02/2014 17:10, Luca Cerone wrote:
Thanks for the advices Sergio and Jean-Olivier.
Of course I forgot, but I am interested in supervised classification!
I'll go through the packages you suggested to me!
On Fri, Feb 28, 2014 at 1:13 AM, zhenjiang zech xu
zhenjiang...@gmail.com wrote:
Dear all,
I did a 5-repeat of 10-fold cross validation using partial least square
regression model provided by caret package. Can anyone tell me how are the
values in plsTune$resample calculated? Is that
Please give a reproducible example. When I run your code I get object
'stocks' not found. So what is stocks?
On Thu, Feb 27, 2014 at 11:24 PM, George Katsuras geoka...@hotmail.com wrote:
I successfully downloaded and loaded the stockPortfolio and quadprog
packages, but when I entered the
Now I feel quite stupid :) I was assuming that since there is a
Clustering one there would have been a Classification one as well
:)
Thanks for pointing it out to me!
Luca Cerone
Tel: +34 692 06 71 28
Skype: luca.cerone
On Fri, Feb 28, 2014 at 6:38 PM, Prof Brian Ripley
rip...@stats.ox.ac.uk
I have gone through quite a few papers but they all fail to give me the
intuition.
So i posted here :
http://stackoverflow.com/questions/22060675/r-monte-carlo-integration-using-importance-sampling/22064557?noredirect=1#22064557
and here (CrossValidated):
Hi everybody,I'm a beginner in R so this question it could may simple for u
(I hope it).I need to study the interaction between 4 independent variables
(x1, x2, x3, x4) and a dependent variable (y). So I've used a list of
regression models (using the lm function)
as:REGR.LIN-lm(y~0+x1+x2+x3+x4)now
Dear Helpers,
I would like to add some text to my plot, containing a variable and the
calculated value for the variable.
As I would like to produce many plots, I hope this can be done
automatically.
Unfortunately I can't get R to do the calculation for cor(nou,dak) when
hi..i would create a pivot table in R and i would create two levels of
columns. I'll try to explain better. I have a table so done:
id agency offer month product
1 aL gen star
2 bM feb meteor
3
Hi,
first of all: I am new to R. Anyway, I would like to include sql files in
my r-script, which I load via source(scriptname) in the CLI.
The sql files (i.e. stmt.sql) contains select statements with joins, line
breaks, various characters, they can be quite long.
My question is, is there a way
Hi everyone,
I am using the script below to create a map plot of Ireland.
Hi all,
I am running the script below to produce a map. The problem I am having is
saving it as a postscript file. A postscript file is created, but it is blank.
I have also run this is linux (with different paths) and I get the same thing
(blank postscript file). Does anyone know how to do
Hai
There are in the r package called poLCA and this package using the latent
class. Is there a package to resolve latent profile and what and how we can
support the answer with an example
Thank you
[[alternative HTML version deleted]]
__
HI Dila,
You have to order it afterwards.
res -
transform(melt(dat,id.var=c(Year,Day)),Month=match(variable,month.abb),Amount=value)[,-c(3:4)]
res1 - res[with(res,order(Year,Month,Day)),]
A.K.
On Friday, February 28, 2014 2:16 AM, dila radi dilarad...@gmail.com wrote:
Dear Arun,
Thank you
Dear all,
I write a R function that it should handles strings like removing spaces at the
beginning or
returning NA according an IF condition. Here you are the code:
corregge.CF - function(stringa){
nc - nchar(stringa)
stringa - sub(^ , , stringa)
stringa - sub( +$, , stringa)
if
Hi All,
With the risk of asking an obvious question: I have use the following code to
generate hexagonal tessellation:
lambertCRS-+proj=laea
coords1-matrix(c(-30,31,-30,80,50,80,50,31,-30,31),ncol=2, byrow=TRUE)
coords=project(coords1,lambertCRS)
pg=Polygon(coords)
HexPts=spsample(pg,
On 28/02/2014 5:16 AM, Streng Ge-heim wrote:
Hi,
first of all: I am new to R. Anyway, I would like to include sql files in
my r-script, which I load via source(scriptname) in the CLI.
The sql files (i.e. stmt.sql) contains select statements with joins, line
breaks, various characters, they can
Unfortunately I can't get R to do the calculation for cor(nou,dak) when I
use expression()..
text(0,2.2,expression(paste(r[Pearson],=, cor(nou,dak) , sep=
)),pos=4,
cex=1.5)
Use bquote() and its .() operator, as in
with(mtcars, {
plot(wt, mpg)
text(4, 30,
I used copy -paste. I will try to find the mistake.
I know the source , but is is more complicated, because I have to define
the hierarchical structure of the table before I load this 6000 or more
records, then I fill in the table whit this frequencies.
Thanks
Bea
2014-02-28 0:19 GMT+01:00
Hello, I have a dataframe called rsts. It looks like this:
head(rsts)
date Value
1 2012-08-0745
2 2013-11-1047
3 2014-01-2828
4 2013-10-2250
5 2013-06-1335
6 2013-05-2832
where I ran as.Date(date) to get the date column as date objects.
I tried this:
You need to write:
rstst=rsts[-which(rsts$dateas.Date('2011-03-01')),]
Here is what you had as the expression since it was not a Date object:
2011-03-01
[1] 2007
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to
Is this what you want:
x
id agency offer month product
1 1 a L genstar
2 2 b M feb meteor
3 3 c N genmoon
4 4 d O marchmoon
require(reshape2)
dcast(x, agency + offer ~ product, fun = length)
Using product as value column: use
I did forget that reading LDA package could also help
Sergio
Il 28/feb/2014 19:39 Luca Cerone luca.cer...@gmail.com ha scritto:
Now I feel quite stupid :) I was assuming that since there is a
Clustering one there would have been a Classification one as well
:)
Thanks for pointing it out to
Hi list,
I have a dataframe df looking like this one:
St.SamSpVar1 Var2NTPT
ST1.S1Sp112aa2032
ST1.S1Sp232bb4526
ST1.S1Sp112aa 3 5
ST1.S1Sp347cc8935
ST1.S2Sp125dd2966
ST1.S2Sp2
On Feb 28, 2014, at 8:22 AM, Ciara O'Hara wrote:
Hi all,
I am running the script below to produce a map. The problem I am having is
saving it as a postscript file. A postscript file is created, but it is
blank. I have also run this is linux (with different paths) and I get the
same
Hi again,
Sorry for disturbing. After posting I suddenly found a solution.
As it may help someone else here it goes.
df
du1 - duplicated(df[,c(St.Sam,Species)],fromLast = F)
du2 - duplicated(df[,c(St.Sam,Species)],fromLast = T)
X - df[du1|du2,]
aggRows - aggregate(cbind(NT,PT)
On 01/03/14 03:53, Ciara O'Hara wrote:
Hi everyone,
I am using the script below to create a map plot of Ireland.
Hi,
You could use ?ddply
library(plyr)
cbind(ddply(dat,.(St.Sam,Sp),function(x)
x[!duplicated(x$Var1),])[,-c(5:6)],ddply(dat,.(St.Sam,Sp),colwise(sum,.(NT,PT)))[,-c(1:2)])
St.Sam Sp Var1 Var2 NT PT
1 ST1.S1 Sp1 12 aa 23 37
2 ST1.S1 Sp2 32 bb 45 26
3 ST1.S1 Sp3 47 cc 89 35
4
Dear R List,
today i have installed Ubuntu as i decided to give this a try after running R
in windows was always running out of memory in making my figures. I have copied
my working folders into Ubuntu and changed the WD and the \\ into /. I tried to
re run the script and it was going all well
Dear R users,
as I often have to visually divide my R output into blocks, especially
when I create R executable scripts, I created hrr in the hope that
this simple package might come in handy to you.
I released it to CRAN today.
It is a simple package to create and print fully customisable
If, 'dat' is the dataset:
res -
as.data.frame(do.call(rbind,lapply(split(dat,list(dat$St.Sam,dat$Sp),drop=TRUE),function(x)
c(unlist(x[1,1:4]),colSums(x[,5:6])
row.names(res) - 1:nrow(res)
res
St.Sam Sp Var1 Var2 NT PT
1 ST1.S1 Sp1 12 aa 23 37
2 ST1.S2 Sp1 25 dd 29 66
3
HI Farnoosh,
Try:
D1= c(5/25/2012 14:48, 5/29/2012 16:53, 6/1/2012 18:30)
D2= c(6/8/2012 21:26, 6/11/2012 15:10 , 6/14/2012 17:57)
as.numeric(as.POSIXct(D2,format=%m/%d/%Y
%H:%M)-as.POSIXct(D1,format=%m/%d/%Y %H:%M)) #days
#[1] 14.27639 12.92847 12.97708
#or
Hi. I have a dataframe called radSamp
which looks like this:
head(radSamp[,c(3,4,5)])
Latitude Longitude Value
1 39.16094 140.488345
2 32.84428 -117.224047
3 35.80605 139.378928
4 35.07816 -106.612350
5 35.83174 136.202735
6 34.78944 137.949632
This is radiation
Hi George,
Please keep the R mailing list copied--I've added them back.
The example on the webpage you listed is wrong, in a way that would be
obvious if you took the time to familiarize yourself with the basics
of R. stocks has no names.
Best,
Ista
On Fri, Feb 28, 2014 at 6:45 PM, George
Hi Christian,
I know you've checked many times, but it is very likely that you are
not typing the file name correctly, or that the file is not where you
think it is. Please run these lines and post the output back here:
setwd(~/Documents/DATABASES/Functional_Annotations)
list.files()
Best,
Ista
Hi everyone,
I am using the axis command to draw extra axis on the right. How do I
change the text size of the labels as in
axis (4, at=c(1:9), labels='some text', las=1).
I can't find an argument to change the text size for the labels. Thanks.
Jun
[[alternative HTML version
On 03/01/2014 01:53 AM, Ciara O'Hara wrote:
Hi everyone,
I am using the script below to create a map plot of Ireland.
I'm too lazy to figure out the details of what you are trying to do, but
I think it is possible that you might find the facilities of the
spatstat package useful and that these might save you some
wheel-reinvention. Look in particular at the quadrats(), tess() and
im() functions.
cheers,
Hi, Thanks. I see that quadrats, Divides window into rectangular quadrats
and returns the quadrats as a tessellation. Do you know what they mean by
window? And I saw this:
W - square(10)
Z - quadrats(W, 4, 5)
plot http://inside-r.org/r-doc/graphics/plot(Z)
data
On 03/01/2014 02:08 PM, Jun Shen wrote:
Hi everyone,
I am using the axis command to draw extra axis on the right. How do I
change the text size of the labels as in
axis (4, at=c(1:9), labels='some text', las=1).
I can't find an argument to change the text size for the labels. Thanks.
Hi
Dear all,
I need to fit a multielvel model for an ordinal response. Does R have a
command for conducting a multilevel ordinal logistic regression when the
model violates the parallel regression or proportional odds assumption?
Additionally, are there any tests to check the parallel regression
Hi list
I have a matrix of size m x n (m and n are different, hence non square!)
I want to melt it in such a way that I get a df of 3 columns. m ,n and cell
value in the original matrix.
Any suggestions?
--
*Chirag Gupta*
Department of Crop, Soil, and Environmental Sciences,
115 Plant Sciences
On 01/03/14 14:49, Chirag Gupta wrote:
Hi list
I have a matrix of size m x n (m and n are different, hence non square!)
I want to melt it in such a way that I get a df of 3 columns. m ,n
Surely you mean i, j (i = 1, ..., m), j = 1, ..., n).
and cell
value in the original matrix.
Yes:
On 01/03/14 16:36, Bill wrote:
Hi, Thanks. I see that quadrats, Divides window into rectangular
quadrats and returns the quadrats as a tessellation. Do you know what
they mean by window?
Yes, I do. And so would you if you read the documentation that comes
with spatstat. Perhaps start with
library(reshape2)
mx - matrix( 1:12, nrow=3 )
mxdf - melt( mx )
names( mxdf ) - c( m, n, value )
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics:
57 matches
Mail list logo