Hi, I could not open the file.
Can you load the data into R and then use the dput function?
The first link deals with dput. The latter 2 links are for dealing with
NAs in data.
http://www.inside-r.org/r-doc/base/dput
dput {base}
Dear Mr/ms
My name is dwi nabila. I am a postgraduate student of Statistics Department
from University of Padjadjaran, Indonesia. Now I am at fourth semester, and I
will write a thesis to complete my study. My adviser give me advice to write
about FPCR. I have gcm data(x) , where there are 64
On Tue, 30 Apr 2013, Paul Johnson wrote:
Greetings to r-help land.
I've run into some program crashes and I've traced them back to
methods() behavior after the package gdata is loaded. I provide now a
minimal re-producible example. This seems bugish to me. How about you?
dat -
On Wed, 1 May 2013, Elaine Kuo wrote:
Hello,
I am work with a linear regression model:
y=ax+b with the function of lm.
y= observed migration distance of butterflies
x= predicted migration distance of butterflies
Usually the result will show
if the linear term a is significantly
Hello,
Banging my head against a wall here ... can anyone light the way to a
pattern modification that would make the following TRUE?
identical(
grep(
^Intensity\\s[^HL],
c(Intensity,Intensity L, Intensity H, Intensity Rep1)),
as.integer(c(1,4)))
Thank you for your time.
Hi,Has anybody worked with thornthwaite method to calculate the daily
evapotranspiration ? I have used the following code to calculate monthly
evaporation but what I need is daily evapotranspiration.
Epot - thornthwaite(Tave, lat, na.rm = FALSE) # Evaluates evapotranspiration
for each month.
On 05/01/2013 02:46 AM, capricy gao wrote:
I noticed that the points on the biplot are not exactly the same as the
predicted values.
Could any body give me a hint about why?
Hi capricy,
If you mean the points that would result from the suggestion I sent
yesterday, it is probably because
so in other words there is no easy way of doing this?
I don't want to spend too much time figure out how this progress bar works.
I am not clear if the code should run in the main R or where.
On 4/30/2013 13:11, R. Michael Weylandt wrote:
On Tue, Apr 30, 2013 at 10:40 AM, Fabio Berzaghi
try this:
identical(
+ grep(
+ ^Intensity *[HL],
+ c(Intensity,Intensity L, Intensity H, Intensity Rep1),
+ invert = TRUE),
+ as.integer(c(1,4)))
[1] TRUE
On Wed, May 1, 2013 at 4:37 AM, Johannes Graumann
johannes_graum...@web.dewrote:
Hello,
Banging my head against a
Hello,
The following pattern seems to do it.
grep(^Intensity$|^Intensity\\s[^HL],
c(Intensity,Intensity L, Intensity H, Intensity Rep1))
Hope this helps,
Rui Barradas
Em 01-05-2013 09:37, Johannes Graumann escreveu:
Hello,
Banging my head against a wall here ... can anyone light the
On Wed, May 1, 2013 at 12:19 PM, Fabio Berzaghi f...@dmu.dk wrote:
so in other words there is no easy way of doing this?
That's not what I said.
It's easy to make a progress bar if you use plyr:e.g.,
ddply(baseball, .(id), mutate, career_year = year - min(year) + 1,
.progress = time)
Our
Dear List,
I am struggling with the following problem.
Suppose I have the following data.frame:
coord-expand.grid(x=1:10,y=1:10)
and I want to extract the row numbers of those matching the criteria defined by
the following data.frame:
choice-data.frame(x=c(2,1,2),y=c(1,2,2))
the result
HI,
You could also do:
vec1- c(Intensity,Intensity L, Intensity H, Intensity Rep1)
identical(setdiff(seq_along(vec1),grep(H|L,vec1)),as.integer(c(1,4)))
#[1] TRUE
A.K.
- Original Message -
From: Johannes Graumann johannes_graum...@web.de
To: r-h...@stat.math.ethz.ch
Cc:
Sent:
Hi,
I want to fit standardized generalized hyperbolic distribution to my data. I am
aware, that I can do this with the dsgh command of the fBasics package along
with the optim command. My problem is, that I also want to have a derivation of
it. So I need the theory behind it, i.e. I need the
Hi,
I want to fit a standardized generalized hyperbolic distribution to my data. I
am aware, that I can do this with the dsgh command of the fBasics package along
with the optim command. My problem is, that I also want to have a derivation of
it. So I need the theory behind it, i.e. I need the
match(interaction(choice),interaction(coord))
#[1] 2 11 12
A.K.
- Original Message -
From: Enrico R. Crema enryu_cr...@yahoo.it
To: r-help@r-project.org
Cc:
Sent: Wednesday, May 1, 2013 7:54 AM
Subject: [R] selecting rows based on multiple criteria
Dear List,
I am struggling with
You could also use:
which(apply(coord,1,paste,collapse=)%in%apply(choice,1,paste,collapse=))
#[1] 2 11 12
#or
which(sapply(seq_len(nrow(coord)),function(i)
any(duplicated(rbind(coord[i,],choice)
#[1] 2 11 12
#or
coord$Newcol1- TRUE
choice$Newcol2- TRUE
Cool! Thanks!
Enrico
On 1 May 2013, at 14:09, arun wrote:
match(interaction(choice),interaction(coord))
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
This comes as an application to this question:
http://stackoverflow.com/questions/5896648/sum-object-in-a-column-between-an-interval-defined-by-another-column/5897695#comment23166107_5897695
What I would like to know is how to adjust the answer if I want to sum the
values in B, for
You need to clarify what you are trying to achieve and fix some errors in
your code. First, thanks for giving us reproducible data.
Once you have read the file, you seem to be attempting to remove cases with
missing values, but you check for missing values of count twice and you
never check
If you are asking R-help readers to do your thesis work the answer is probably
no. If you are asking for specific advice on how to carry out some R operations
we need moer information and some idea of what you have already done in R :
R 2.12.2 on Scientific Linux 6.4
#works
chron(times.=15:00:00, format=c(times=h:m:s))
#doesn't work
chron(times.=15:00, format=c(times=h:m))
From chron Manual:
The times format can be any permutation of h, m, and s separated
by any one non-special character. The default is h:m:s.
what am I
Dear All,
I fitted two non-nested proportional hazards models using the coxph()
function from package survival. Now, I would like to apply a model
selection test like, e.g., the likelihood ratio test proposed by Vuong.
I found an implementation of Vuong's test in the package 'pscl', but
that
Dear R Helpers,
I am trying to do calculations on multiple data frames and do not want to
create a list of them to go through each one. I know that lists have many
wonderful advantages, but I believe the better thing is to work df by df
for my particular situation. For background, I have
A less-than-ancient version of R?
The documentation does not say the dates. argument is optional.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics:
HI,
One possible way would be to use paste()
chron(times.=paste0(15:00,:00),format=c(times=h:m:s))
#[1] 15:00:00
#or you could use
library(lubridate)
hm(15:00)
#[1] 15H 0M 0S
A.K.
- Original Message -
From: Stephen Sefick sas0...@auburn.edu
To: r-help@r-project.org
Thanks for the quick replies. I have this working with a similar
suggestion to what arun suggests. I am just interested in why the option
to use just h:m isn't supported.
#re: Jeff
chron(dates.=2009/05/01, times.=15:00:00, format=c(dates=c(y/m/d),
times=h:m:s))
chron(dates.=2009/05/01,
Hello every body,
I am using rpy2_2.0.8 with postgres and Qgis.
The code that I wrote is the following:
def on_calcola_pressed (self):
# bottone per calcoli statistici
import rpy2
import rpy2.robjects as robjects
import
I am trying to do calculations on multiple data frames and do not want to
create a list of them to go through each one. I know that lists have many
wonderful advantages, but I believe the better thing is to work df by df
for my particular situation.
Can you give some details about why you
On Wed, May 1, 2013 at 3:05 PM, Enzo Cocca enzo@gmail.com wrote:
Hello every body,
I am using rpy2_2.0.8 with postgres and Qgis.
The code that I wrote is the following:
def on_calcola_pressed (self):
# bottone per calcoli statistici
import rpy2
HI Stephen,
I am using R 3.0.0. The responses in an old thread
(http://r.789695.n4.nabble.com/times-td3016621.html), suggests some solutions,
but not the one you are looking for.
A.K.
sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1]
This behavior is a property of the chron package, not R. The help file
does say the format should include a permutation of h, m, and s, not a
selection of them. Look at the code chron and you will see several
places where is it assumed that the formats and time strings have exactly
three parts.
On Wed, 01 May 2013, stephen sefick sas0...@auburn.edu writes:
Thanks for the quick replies. I have this working with a similar
suggestion to what arun suggests. I am just interested in why the option
to use just h:m isn't supported.
#re: Jeff
chron(dates.=2009/05/01, times.=15:00:00,
Sorry everybody. Permutation not selection is the key thing here. My
fault.
What date time formats are suggested?
kindest regards,
Stephen
On 05/01/2013 01:21 PM, Enrico Schumann wrote:
On Wed, 01 May 2013, stephen sefick sas0...@auburn.edu writes:
Thanks for the quick replies. I have
On May 1, 2013, at 10:55 AM, Stephen Sefick wrote:
Thanks for the quick replies. I have this working with a similar
suggestion to what arun suggests. I am just interested in why the option
to use just h:m isn't supported.
#re: Jeff
chron(dates.=2009/05/01, times.=15:00:00,
I'm using refClass for a complex multi-directional tree structure with possibly
100,000s of nodes. The refClass design is very impressive and I'd love to use
it, but I've found that the size of refClass instances are very large and
creation time is slow. For example, below is a RefClass and
Hi,
You could use:
library(plyr)
for(i in letters[24:26]) assign(i,mutate(get(i),V4=V2+V3))
x
# V1 V2 V3 V4
#1 1 2 3 5
#2 1 2 3 5
#3 1 2 2 4
#4 1 2 2 4
#5 1 1 1 2
y
# V1 V2 V3 V4
#1 1 2 3 5
#2 1 2 3 5
#3 1 2 2 4
#4 1 2 2 4
#5 1 1 1 2
A.K.
Dear R
Hi, Jim,
Thank you very much for your email.
Could you please explain more about the modification about how to adding this
pch=1,cex=0.2 to the following command line?
biplot(pca2,xlabs=rep(.,19000))
The R document seems to only take text input, whereas pch=1,cex=0.2 are
actually graphic
I am trying to create a high resolution tiff. It is not working.
I am on Windows XP 32-bit
R 3.0.0
Code input:
tiff(file=test.tiff,width=6.83,height=6.83,units=in, res=1200)
Return Message:
Error in tiff(file = test.tiff, width = 6.83, height = 6.83, units =
in, :
unable to start tiff()
Hi ST,
You could try this:
library(plyr)
set.seed(25)
mydf- data.frame(subid=rep(1:5,each=3),Col=sample(c(0:5,NA),15,replace=TRUE))
retsample - function(df, Column,size) {
set.seed(1234)
mysel - ddply(df, .(subid),function(x)
summarize(x,missing=sum(is.na(x[[Column]])|x[[Column]]==0)))
myids-
Sorry, the use of rows/columns I found so far was rather
contradictive, both refering to what can be gotten via subset()
instead of what I'm looking for.
Is there a way to get multiple colums/rows? Something like
corpus.df${mph,mgl,eng}
Thanks in advance for any answers.
--
Joel Prokopchuk
Hi David,
thank yuou so much for helping me!
Il giorno 01/mag/2013, alle ore 10:16, David Carlson dcarl...@tamu.edu ha
scritto:
You need to clarify what you are trying to achieve and fix some errors in
your code. First, thanks for giving us reproducible data.
i tried to fix the errors
Dear sir/madam,
I used as.Date,strptime, POXIct, and POXIlt functions to
work on my data in R. Please, I would like to know the function to find the
difference between the dates and times in two different columns and make a new
column for that. Thank you
Hello,
To compute the difference between two date/time objects use the minus
operator. See
?difftime
?`-.POSIXt`
Hope this helps,
Rui Barradas
Em 01-05-2013 16:58, Eric Mintah escreveu:
Dear sir/madam,
I used as.Date,strptime, POXIct, and POXIlt functions to
work
Hello,
Try
corpus.df[, c(mph, mgl, eng)]
Hope this helps,
Rui Barradas
Em 01-05-2013 21:04, Joel Prokopchuk escreveu:
Sorry, the use of rows/columns I found so far was rather
contradictive, both refering to what can be gotten via subset()
instead of what I'm looking for.
Is there a way to
We are using boss package function in R and getting the below error message.
Please advice
Error: could not find function boss.set
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Hi,
May be this helps:
dat1- as.data.frame(table1)
dat2- as.data.frame(table2)
names(dat2)-c(V3,V4)
library(plyr)
res-join(dat1,dat2,type=full)
res[is.na(res)]- 0
res
# V1 V2 V3 V4
#1 1 1 0 0
#2 1 2 0 0
#3 0 0 0 1
#4 0 0 0 4
combinedtable-as.matrix(res)
Why do you need TIFF? I've never seen a science journal that claims they
want TIFF figure submissions who are really serious about that. This is a
very wasteful format. Most journals want PDF.
Frank
Aldo wrote
I am trying to create a high resolution tiff. It is not working.
I am on Windows
Hi Joel,
I have no idea what you actually want, since there's no context in
your email, but you should probably see:
?[
for information on how to subset a data frame by rows and/or columns
using either numerical indices or names (if appropriate for the
object).
Sarah
On Wed, May 1, 2013 at 4:04
On May 1, 2013, at 12:31 PM, Pramod Anugu wrote:
We are using boss package function in R and getting the below error message.
Please advice
Error: could not find function boss.set
Try searching the R-FAQ for could not find function.
--
David Winsemius
Alameda, CA, USA
try tb[c('name1','name3'), c('col1','col5')]
Hong Qin
Sent from my iPad
On May 1, 2013, at 4:04 PM, Joel Prokopchuk joelpr...@gmail.com wrote:
Sorry, the use of rows/columns I found so far was rather
contradictive, both refering to what can be gotten via subset()
instead of what I'm looking
Thanks everyone. I had looked in the documentation (just in the wrong
places,apparently) and googled, but I couldn't find this.
2013/5/1 Rui Barradas ruipbarra...@sapo.pt:
Hello,
Try
corpus.df[, c(mph, mgl, eng)]
Hope this helps,
Rui Barradas
Em 01-05-2013 21:04, Joel Prokopchuk
On May 1, 2013, at 1:41 PM, David Winsemius wrote:
On May 1, 2013, at 12:31 PM, Pramod Anugu wrote:
We are using boss package function in R and getting the below error message.
Please advice
Error: could not find function boss.set
Try searching the R-FAQ for could not find function.
Hi,
Assuming that your dataset is similar to the one below:
set.seed(25)
dat1-
On May 1, 2013, at 22:40 , Lorenzo Isella wrote:
(A) The example doesn't run for me. library(ares) is not available on
current R versions, but even where it is available, it doesn't provide a
multinom() function?
Apologies, ares is not needed at all. Please find the correct script
On Wed, May 1, 2013 at 12:28 PM, Stephen Sefick sas0...@auburn.edu wrote:
R 2.12.2 on Scientific Linux 6.4
#works
chron(times.=15:00:00, format=c(times=h:m:s))
#doesn't work
chron(times.=15:00, format=c(times=h:m))
From chron Manual:
The times format can be any permutation of h, m, and s
add2blocks - function(m1, m2) { res - cbind(m1, matrix(0, dim(m2)[1],
dim(m2)[2]) )
res - rbind(res, cbind( matrix(0, dim(m1)[1],
dim(m1)[2]), m2) ) }
new - add2block(table1, table2)
new
#---
[,1] [,2] [,3] [,4]
row11100
row212
Derar Rxperts,
I have a strange situation.. I see curly brackets around strip.levels in
multipanel strips while using lattice::xyplot. .How do I get rid of the
curly brackets? For some reason, I am not able to reproduce the problem
using an example below...
Any suggestions are highly welcome!
Hi,
If you are using Rstudio, please check this link
(http://support.rstudio.org/help/discussions/problems/850-ddply-misbehaving-in-rstudio-and-only-in-rstudio).
A.K.
- Original Message -
From: arun smartpink...@yahoo.com
To: R help r-help@r-project.org
Cc: David Winsemius
Hi David,
thank yuou so much for helping me!
Il giorno 01/mag/2013, alle ore 10:16, David Carlson dcarl...@tamu.edu ha
scritto:
You need to clarify what you are trying to achieve and fix some errors in
your code. First, thanks for giving us reproducible data.
i tried to fix the errors ,
On May 1, 2013, at 6:16 PM, Santosh wrote:
Derar Rxperts,
I have a strange situation.. I see curly brackets
Wait right here. What do you mean by brackets? In some locales, such as mine,
that might mean [ ; in other domains... well, who knows? I don't see any
[.
The Urban Legends
Isn't this just a block diagonal matrix?
library(pracma)
blkdiag(table1, table2)
[,1] [,2] [,3] [,4]
[1,]1100
[2,]1200
[3,]0001
[4,]0004
Dennis
On Wed, May 1, 2013 at 5:41 PM, David Winsemius dwinsem...@comcast.net wrote:
Actually, quite a few journals do ask for .tiff (or, often, also .eps)
only (as part of their webpage instructions) but my experience has been
that many take .pdf without a lot of fuss.
The OP could try and see if pdf will fly. If not, then (s)he can go
for TIFF images. If this is at the
#or
library(magic)
adiag(table1,table2) #rownames are preserved
# [,1] [,2] [,3] [,4]
#row1 1 1 0 0
#row2 1 2 0 0
#row3 0 0 0 1
#row4 0 0 0 4
A.K.
- Original Message -
From: Dennis Murphy djmu...@gmail.com
To: David Winsemius
HI,
I am not sure what is wrong in your side. I cut and paste the same code and I
get this:
library(plyr)
set.seed(25)
mydf- data.frame(subid=rep(1:5,each=3),Col=sample(c(0:5,NA),15,replace=TRUE))
retsample - function(df, Column,size) {
set.seed(1234)
mysel - ddply(df, .(subid),function(x)
Sorry about the word brackets.. Yes, I meant curly braces! I have not
heard of curley braces! :). Curly braces surrounding the values of
strip.levels appear on the strip of multipanel plots.
Thanks,
Santosh
On Wed, May 1, 2013 at 7:44 PM, David Winsemius dwinsem...@comcast.netwrote:
On May
This is not a request for coding help so there is no reproducible code,
rather I am trying to figure out if anyone had had a similar experience.
My question is related to partitioning the variance in rda (vegan) results
for multiple groups of variables. I have a high dimensional dataset with
79
Hi,
Attached are two datasheet to be read.
My raw data 130502temp.xlsx contains numbers with ' symbols, and they
can't be read as numbers. Even if I copy and paste as numbers to form a new
file 130502temp_number1.xlsx, they could not be read smoothly.
1. How can I read the datasheet as
On May 1, 2013, at 8:37 PM, Thomas Parr wrote:
This is not a request for coding help so there is no reproducible code,
So this is a general statistical problem?
Perhaps you should try: CrossValidated.com
rather I am trying to figure out if anyone had had a similar experience.
My
On May 1, 2013, at 8:16 PM, Santosh wrote:
Sorry about the word brackets.. Yes, I meant curly braces! I have not
heard of curley braces! :). Curly braces surrounding the values of
strip.levels appear on the strip of multipanel plots.
Not in my running of your code.
Thanks,
Santosh
Hello every one:
I get following warning when building my R package with R-3.0.0.
building 'SPEEDY.tar.gz' Warning in utils::tar(filepath, pkgname,
compression = gzip, compression_level = 9L, : number of items to replace
is not a multiple of replacement length thanks Michael
I have no idea
Hi Santosh
Try this :
q -
data.frame(G=rep(paste(G,1:3,sep=),each=50),
D=rep(paste(D,1:5,sep=),each=30),
a=rep(1:15,each=10),t=rep(seq(10),15),
b=round(runif(150,10,20)))
q$grp - paste(q$D,q$a,sep=:)
q$grp - ordered(q$grp, levels=unique(q$grp))
q$dcol -
Thanks Michael!
I solved using the form Pyper example:
def on_calcola_pressed (self):
# bottone per calcoli statistici
from pyper import *
r = R()
r('library(RPostgreSQL)')
r('drv - dbDriver(PostgreSQL)')
r('con - dbConnect(drv, host=127.0.0.1, dbname=pyarchinit,
port=5432,
73 matches
Mail list logo