Hi, there,
I have a similar problem. The chron example gives NA. dates doesn't work but
times does.
I would appreciate it if there's a fix for it.
Thanks,
Helena
> example(chron)
chron> dts <- dates(c("02/27/92", "02/27/92", "01/14/92",
chron+"02/28/92", "02/01/92"))
chron> dt
This is daylight savings time issue.
Use chron or set your TZ environment variable to a standard-time-only timezone
(or don't enter nonexistent time values for the timezone in which you wish to
compute).
---
Jeff Newmiller Th
There is a friedman.test() function. Any reason you want to do it by hand?
If so, you can do:
#Simulated data matrix
x<-matrix(rnorm(9),3,3,byrow=T)
x
#Rank matrix
r<-matrix(rank(x),dim(x))
HTH,
Daniel
JohnnyJames wrote:
>
> My data looks like this:
> (treatmen
My data looks like this:
(treatments)
T1 T2T3
DK 8 5 3
JP 54 1
AS 97 4
MK 8
I believe it has to do with the "complete.obs" choice and the presence
of NAs in your data. The differences should vanish with
"pairwise.complete.obs" but whether that's what you want is up to you.
Michael
On Tue, Oct 25, 2011 at 5:09 PM, AlexC wrote:
> Hi,
>
> I am currently working with a dat
Hi,
I am currently working with a data set which contains a list of julian dates
of phenological (flowering, leaf growth etc.)
I obtained a correlation matrix by simply using the cor function with the
dataset cor(dataset,use="complete.obs")
that gives me a correlation matrix but the correlatio
Thank you for the response and I am sorry about the html--will
remember next time.
The version of RGtk2 installed is 2.20.8 I installed it through R from
CRAN repository.
I believe that the problem is that during the installation the
environment variable GTK_BASEPATH was set to some other location
Hello,
I am pretty new to R, I have always used SAS and SAS products. My
target variable is binary ('Y' and 'N') and i have about 14 predictor
variables. My goal is to compare different variable selection methods
like Forward, Backward, All possible subsests. I am using
misclassification rate to p
Thanks, all!
I've tried changing the start and end of the loop and I tried cbind initial
column with the other columns to get the matrix I want. It did work! Thanks
also for the note about the parentheses. It real useful.
I'll try Oarray if that would fasten the iteration. Thanks again!
Deana
On 26/10/11 10:46, Vining, Kelly wrote:
Dear UseRs,
I have a data frame that looks like this:
head(test2)
attributes start end StemExplant Callus RegenPlant
1 LTR_Unknown 120 535 3.198 1.931 1.927
3 LTR_Unknown 2955 3218 0.541 0.103 0.613
6 LTR_Unknown 6
Not quite sure what you were trying to do, but try the slight modification
below and see if it works for you:
x = c (2434.1, 2463.7, 2451.6, 2444.5, 2431.3, 2436.3, 2412.6, 2417.9,
2380.1,
2366.2,
2349.1, 2373.9, 2336.9, 2335.0, 2297.1, 2291.1, 2278.6, 2289.9, 2314.5,
2328.8,
2322.0, 2337.3,
On Tue, 25 Oct 2011, David Winsemius wrote:
At the console type:
help(package=reshape2)
Thank you, David.
Rich
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project
On Oct 25, 2011, at 5:39 PM, Rich Shepard wrote:
I installed the rshape2 package and loaded the library. But, when I
type
'?rshape2' I'm told there's no help available for it.
CRAN has no .pdf documentation for this package. Where do I find
the docs
I need to learn how to use it with my
Vining, Kelly wrote:
>
> Dear UseRs,
>
> I have a data frame that looks like this:
>
> head(test2)
> attributes start end StemExplant Callus RegenPlant
> 1 LTR_Unknown 120 535 3.198 1.931 1.927
> 3 LTR_Unknown 2955 3218 0.541 0.103 0.613
> 6 LTR_Unknown 6
Dear UseRs,
I have a data frame that looks like this:
head(test2)
attributes start end StemExplant Callus RegenPlant
1 LTR_Unknown 120 535 3.198 1.931 1.927
3 LTR_Unknown 2955 3218 0.541 0.103 0.613
6 LTR_Unknown 6210 6423 6.080 4.650 9.081
9
I installed the rshape2 package and loaded the library. But, when I type
'?rshape2' I'm told there's no help available for it.
CRAN has no .pdf documentation for this package. Where do I find the docs
I need to learn how to use it with my data?
TIA,
Rich
___
Are you trying to separate the substrings in cat? If so, one way is to
use the colsplit() function in the reshape2 package, something like
(untested since you did not provide a suitable data format with which
to work):
library('reshape2')
splitcat <- colsplit(mydata$cat, ' ', names = c('fat', 'bat
There are a few ways to do this. One is to use the lmList() function
in the nlme package and use conditioning in the model formula. Another
is to use the plyr package to create a list of models from which you
can extract pieces of output from each model fit to the data subsets;
for example,
librar
I figured it out, at least enough to get rgeos's gSimplify
function to work, which was my original goal; the stringr
problem was with 0.2, however I got stringr 0.5 to install
by changing the minimum version in DESCRIPTION from R2.11 to
R 2.10. ...
Thanks for the help!
#
# This i
On Tue, Oct 25, 2011 at 4:49 PM, Nordlund, Dan (DSHS/RDA)
wrote:
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
>> project.org] On Behalf Of Sarah Goslee
>> Sent: Tuesday, October 25, 2011 12:50 PM
>> To: Andrés Aragón
>> Cc: R-help@r-project.org
>> S
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Sarah Goslee
> Sent: Tuesday, October 25, 2011 12:50 PM
> To: Andrés Aragón
> Cc: R-help@r-project.org
> Subject: Re: [R] extract data for specific levels factor
>
> Hi,
>
> 201
Hi,
2011/10/25 Andrés Aragón :
> Dear all,
>
> I'm trying to analyze data with the following structure:
>
> ind cat tx age
> 40.2 por fol peq vh 35
> 41.9 por fol med vh 35
> 68.9 por fol preov vh 35
> 71.5 por fol peq ser 37
> 67.5
Fair enough -- hadn't thought of going the other way. I do remember
looking at that C trick once, but I'm actually somewhat surprised
Fortan has it natively: I had always associated multiple basing with
something like VBA that has to keep everyone on board but no one
happy. Seems a surprisingly fle
I would like to nominate this for a new item in the FAQ for R.
The FAQ should mention both the daylight-savings-time switch
and have a reference to the R-News article
Rich
On Tue, Oct 25, 2011 at 3:16 PM, Adrienne Wootten wrote:
> Ben,
>
> Thanks! That really helped. Turns out all the data bei
Dear all,
I'm trying to analyze data with the following structure:
ind cattx age
40.2 por fol peq vh35
41.9 por fol med vh35
68.9 por fol preov vh 35
71.5 por fol peq ser 37
67.5 por fol medser 37
76.9 por fol preov
Inthe code below I was trying to to obtain the GMM estimates for CAPM
(REGRESSION) for 36 stocks each have 180 observations,however it only gives
me one output rather than 36.
In SAS i would just put in a *By statement*. I have a variable TICKER that
categorize them into 36 groups.
*How can I o
Hi:
Try this:
INDIVIDUAL <- transform(INDIVIDUAL, IDHOUS = IDPERS %/% 100)
merge(INDIVIDUAL, HOUSHOLD, by = c('IDHOUS', 'T'))
IDHOUS T IDPERS SEX PC02 GHS Single COM2 NBPERS NBKID
1 41 1 4101 19 1 NA2 5 3
2 41 1 4102 20 0 NA2 5 3
Ben,
Thanks! That really helped. Turns out all the data being used was in
EST and currently the system timezone is EDT. Thanks for the tip!
A
On Tue, Oct 25, 2011 at 2:27 PM, Ben Bolker wrote:
> Adrienne Wootten ncsu.edu> writes:
>
>>
>> R-listers,
>>
>> I have noticed several posts on issue
Hi there,
I'm adding a very small bit of something utterly useless to Michael's
response. When you start wondering why your code doesn't work the way
you expect, making it as simple as possible might be the first step.
For example, the following piece of code ...
TRUE
... is simpler than ...
!!
When I tried dput function, the result was this:
> dput(x)
c(20, 200, 2000, 2)
> dput(y)
c(0.45, 0.05, 0.5, 0.4, 0, 0.5, 0.4, 0.05, 0.4, 0.25, 0.35, 0.5,
0.05, 0.4, 0.5, 0.5, 0.5, 0.25, 0.85, 0.5, 0.5, 0.5, 0.25, 0.4,
0.25, 0.25, 0.4, 0.25, 0.5, 0.15, 0.25, 0.1, 0.25, 0.25, 0.015,
0.4, 0.5
Eliano Marques writes:
> Hi there,
>
> I need help in an optimization procedement.
>
> I'm trying to maximize the function fn=x^2+5y^2 with the restriction of
> fn1=x-y<=5.
>
> I tried the genoud method and as well the alabama method.
>
> I have problems to set the constraint in R.
>
> Can someon
Adrienne Wootten ncsu.edu> writes:
>
> R-listers,
>
> I have noticed several posts on issues with difftime producing NA's
> but they have been for older versions of R. Here's the issue
> associated with difftime that I am dealing with in R 2.12.2.
>
>
> > difftime(strptime("03/11/2007 02:00"
On 11-10-25 01:35 PM, julien giami wrote:
> The reason i use glmnet is that it makes the handling of 400,000
> observations easier to handle in terms of memory,
>
> I am looking on sparse matrices but i dont understand how to build
> interacting using sparse matrices
>
If you're not familiar w
I'm thinking you need to spend some time reading about subsetting in R:
temp[!complete.cases(temp),] # I don't think you need/want/should use the [,4]
Michael
On Tue, Oct 25, 2011 at 12:38 PM, kaallen wrote:
> Hi,
>
> I am working on a data set which looks like this:
>
>> head(temp)
> Day Mon
Hi,
I'm working with panel data from the Swiss Houshold Panel (SHP). The data i
got came in the following way:
1.) 12 *different* /individual/ files - one for each year .
2.) 12 *different* /houshold/ files - again: one for each year
Each file came in the SPSS format (.sav). I implemented all the
Thank you. I suppose i needed the double bracket. Can't believe i didnt think
of that earlier. That should help me.
--
View this message in context:
http://r.789695.n4.nabble.com/Unlist-alternatives-tp3935331p3937340.html
Sent from the R help mailing list archive at Nabble.com.
_
Hi,
I am working on a data set which looks like this:
> head(temp)
Day Month Year PW ROW
1 1 1 1959 NA 6.40
2 2 1 1959 6.65 6.35
3 3 1 1959 2.50 3.60
4 4 1 1959 0.60 2.25
5 5 1 1959 0.85 0.30
6 6 1 1959 0.00 2.20
I am trying to extract all the rows cont
R-listers,
I have noticed several posts on issues with difftime producing NA's
but they have been for older versions of R. Here's the issue
associated with difftime that I am dealing with in R 2.12.2.
> preciptime = strptime("01/10/2007 14:00",format="%m/%d/%Y %H:%M")
> class(preciptime)
[1] "PO
The reason i use glmnet is that it makes the handling of 400,000
observations easier to handle in terms of memory,
I am looking on sparse matrices but i dont understand how to build
interacting using sparse matrices
On Tue, Oct 25, 2011 at 12:34 PM, Marc Schwartz wrote:
>
> On Oct 25, 2011, at
kaallen wrote:
>
> Hi,
>
> I am working on a data set which looks like this:
>
>> head(temp)
> Day Month Year PW ROW
> 1 1 1 1959 NA 6.40
> 2 2 1 1959 6.65 6.35
> 3 3 1 1959 2.50 3.60
> 4 4 1 1959 0.60 2.25
> 5 5 1 1959 0.85 0.30
> 6 6 1 1959 0.00 2.20
Dear all,
version 0.20-0 of package NMOF is now on CRAN. 'NMOF' stands for
'Numerical Methods and Optimization in Finance'. The package accompanies
the book with the same name, written by Manfred Gilli, Dietmar Maringer
and Enrico Schumann, published by Elsevier/Academic Press in 2011.
The
On Oct 25, 2011, at 11:16 AM, Ben Bolker wrote:
> Bert Gunter gene.com> writes:
>
>>
>> If I understand you correctly, it sounds like you need to do some reading.
>>
>> ?lm and ?formula tell you how to specify linear models for glm or glmnet.
>> However, if you do not have sufficient statisti
I have a question about the D'Agostino skewness test and the Anscombe-Glynn
kurtosis test.
agostino.test(x, alternative = c("two.sided", "less", "greater"))
anscombe.test(x, alternative = c("two.sided", "less", "greater"))
The option "alternative" in those two functions seems to be the null
hyp
That is really quite clever!
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Timothy Bates
Sent: Tuesday, October 25, 2011 6:03 AM
To: Jim Maas
Cc: r-help@r-project.org
Subject: Re: [R] constrain min and max of output
this works
Bert Gunter gene.com> writes:
>
> If I understand you correctly, it sounds like you need to do some reading.
>
> ?lm and ?formula tell you how to specify linear models for glm or glmnet.
> However, if you do not have sufficient statistical background, It probably
> will be incomprehensible, in
On Oct 25, 2011, at 10:40 AM, Assa Yeroslaviz wrote:
Hi all,
@Martin - thanks for the help it works very good.
@David - sorry for the misunderstanding. I will see to it, that it
won't
happen again.
BTW, unfortunately your function is not working.
It is patialy my error as I gave no regions
Yes, but you didn't answer the question: what version of the package
are you using?
-thomas
On Tue, Oct 25, 2011 at 3:03 AM, amitava wrote:
> Respected Sir
> Thanks for your reply.I am giving a part of my output to clarify my
> problem.
>
>
>
>
>> s=sample(N,n,replace=F)
>> print(s)
>
If I understand you correctly, it sounds like you need to do some reading.
?lm and ?formula tell you how to specify linear models for glm or glmnet.
However, if you do not have sufficient statistical background, It probably
will be incomprehensible, in which case you should consult your local
stat
I'm having trouble using gvisGeoChart with region fills. I would like to
fill a map of the U.S. by state. The documentation says it can be of the
form "US-NJ" or "New Jersey", but I tried both and neither works for me.
When I tried the latter the country of Georgia is filled, so at least
it's d
In what way doesn't this work?
You declare xx with one element and it prints.
Then on the next loop, you add another element, and it prints them both.
Then on the next loop, you add another element, and it prints all three.
And so on...
If you look at the output, you can see that it's a growin
Hi all,
@Martin - thanks for the help it works very good.
@David - sorry for the misunderstanding. I will see to it, that it won't
happen again.
BTW, unfortunately your function is not working.
It is patialy my error as I gave no regions with overlaps, but even after
changing them it just doesn't
I think you mean to use if instead of ifelse (and you should probably
read briefly on the difference between them: if is the regular
programming construct: ifelse is a vectorized thing)
if(length(theData) == 0) t0 <- t0 else t0 <- theData
which can be more expressly written as
t0 <- if(length(th
Hi Ville,
McFadden's pseudo R^2 is just a (log) likelihood ratio for your model
compared to the null model. The null is typically an intercept only
model, but other comparisons may be valid also.
If memory serves:
1 - log(full_likelihood)/log(null_likelihood)
you can often extract likelihoods
Hi
I have estimated parameters of my data with mlogit and the following commands.
I would like to know also the McFadden R^2 and the intercept, could soweone
tell me how that can be done?
library(RODBC)
library(mlogit)
library(foreign)
z<-odbcConnectExcel("D:\\MALLI11ARVOT.xls")
We are workin on building a logistic regression using
1. We are doing a logistic regression with binary outcome variable
using a set of predictors that include 8 continuous and 8 category
predictors
2. We are trying to implement interaction between two variables
(continuous and category or just c
Perfect, thanks!
ben
On Tue, Oct 25, 2011 at 8:12 AM, Eik Vettorazzi wrote:
> Hi Ben,
> maybe mtext is of more help here?
>
> par(mar=c(7,3,3,3))
> plot(year,rate,main='main',sub='sub')
> mtext('test',cex=1,side=1,line=5)
> box()
>
> cheers
>
> Am 25.10.2011 15:26, schrieb Ben quant:
> > Hello,
Hi Ben,
maybe mtext is of more help here?
par(mar=c(7,3,3,3))
plot(year,rate,main='main',sub='sub')
mtext('test',cex=1,side=1,line=5)
box()
cheers
Am 25.10.2011 15:26, schrieb Ben quant:
> Hello,
>
> Someone (Erik) recently posted about putting text on a plot. That thread
> didn't help. I'd lik
On Oct 25, 2011, at 6:07 AM, Samir Benzerfa wrote:
Hi
I have probably a very simple question but I'm going crazy trying to
find
the solution.
I have two data.frames with headers and I'm doing an intersection
between
them by names, such that the intersected data.frames are returned b
On 10/25/2011 03:42 AM, Assa Yeroslaviz wrote:
Hi everybody,
I would like to know whether it is possible to compare to tables for certain
parameters.
I have these two tables:
gene table
name chr start end str accession Length
gen1 4 646752 646838 + MI0
I (now) see that you crossposted rhelp and bioc. That practice is
deprecated. Please read the Posting Guide more thoroughly. I will need
to bear the burden of my sin in not looking at headers more closely in
my own.
--
David.
On Oct 25, 2011, at 9:27 AM, David Winsemius wrote:
On Oct
Hi there,
I need help in an optimization procedement.
I'm trying to maximize the function fn=x^2+5y^2 with the restriction of
fn1=x-y<=5.
I tried the genoud method and as well the alabama method.
I have problems to set the constraint in R.
Can someone help me please?
Regards,
Eliano
Hi There,
I have a similar problem.
I have a function that i want to maximize.
lets say: (x-2)^2+(y-4)^2 and i want to constraint that maximization to
x+y<=5
I can program that constraints in R.
Do you have any suggestion?
Regards
--
View this message in context:
http://r.789695.n4.nabble.c
Hi,
I'm trying to execute the same R code on multiple data frames listed in a
single directory. The code works fine if I use the code
(below) for each file. However, I have several files and it becomes
tedious to run each one, name it and then aggregate into a single
dataframe.
Name
0.0
Respected Sir
Thanks for your reply.I am giving a part of my output to clarify my
problem.
> s=sample(N,n,replace=F)
> print(s)
[1] 6 29 27 44 37 43 1 10 26 20
> srswor_sample_data=getdata(salarydata,s)
> attach(srswor_sample_data,warn.conflicts=F)
> dsrswor=svydesign(id=~1,weights=r
Hello,
>From the data provided in the attached file, I would like to find the
seasonal effect and the trend (if there are some) like in page 10 of the
following document:
http://www.statoek.wiso.uni-goettingen.de/veranstaltungen/zeitreihen/sommer03/ts_r_intro.pd
http://www.statoek.wiso.uni-goettin
hi people,
I'm trying to maximize this function:
fn= function (x) {x[1]^2+5*x[2]^2}
with this restriction
fn1 = function (x) {x[1]+x[2] <=5}
Can someone help me how to procedure this?
I tried in the alabama and genoud package but i have problems with the
setting of constrains.
Regards,
Eliano
Hi
I have probably a very simple question but I'm going crazy trying to find
the solution.
I have two data.frames with headers and I'm doing an intersection between
them by names, such that the intersected data.frames are returned by:
df1[intersect(names (df1), names(df2))] and the same for
I've a problem in creating an XML
My code
node= newXMLNode("data")
new<-newXMLNode("new",parent=node)
child<-newXMLNode("Plot",parent=new)
My dataframe Plot looks like below
x y
0 123812.31
1 120166.77
2 15.83
Hi there,
I have the following problem using times() and ifelse().
t0 <- c(rep("NA", 7))
theData <- times(c("07:36:00","08:09:00","10:28:00","13:28:00","16:29:00",
"19:30:00","22:29:00"))
t0 <- ifelse(length(theData)==0, t0,theData)
In this case, R gives this, instead of theData:
> t0
[1] 0.316
Hi Dennis,
Thanks so much, I will try change the code and see what happens.
Many thanks,
Candice
PhD. Student
Centre for Invasion Biology
Department of Botany and Zoology
Stellenbosch University
Cell: 083 987 2200
Date: Mon, 24 Oct 2011 09:18:02 -0700
From: ml-node+s789695n3933698...@
All,
I would like to use the assign to save some data from a calculation
within a foreach loop. Below is a contrived example where I cannot get
output_1 ... output_100 to show up in my list when I do ls(). I have
tried different combinations of pos and envir without anything showing
up.
On Oct 25, 2011, at 6:42 AM, Assa Yeroslaviz wrote:
Hi everybody,
I would like to know whether it is possible to compare to tables for
certain
parameters.
I have these two tables:
gene table
name chr start end str accession Length
gen1 4 646752 646838
Hello,
Someone (Erik) recently posted about putting text on a plot. That thread
didn't help. I'd like to put text directly below the 'sub' text (with no
gap). The code below is the best I can do. Note the large undesirable gap
between 'sub' and 'test'. I'd like the word 'test' to be just below the
On 25/10/2011 9:03 AM, Timothy Bates wrote:
this works
x=1; y=-100;
z = min(5, max(1, x+y));
z
But it only works for scalar x and y. The vector version would use
pmin() and pmax().
Duncan Murdoch
On 25 Oct 2011, at 1:46 PM, Jim Maas wrote:
> Hello,
>
> Is there a simple way/function t
this works
x=1; y=-100;
z = min(5, max(1, x+y));
z
On 25 Oct 2011, at 1:46 PM, Jim Maas wrote:
> Hello,
>
> Is there a simple way/function to constrain the minimum and maximum value of
> an output from an assignment?
>
> if I have
>
> z <- x +y
>
> but I want z to always be between 1 and 5
R. Michael Weylandt wrote:
>
> This may be an unnecessary aside, but other than obfuscating
> code or allowing people to never stop thinking in C and start
> thinking in R, what practical purpose would this package
> serve in an R context?
>
I'd think about constructs like
income[1990:2010]
Hello,
Is there a simple way/function to constrain the minimum and maximum
value of an output from an assignment?
if I have
z <- x +y
but I want z to always be between 1 and 5, such that z=5 if (x+y >= 5)
and z=1 if (x+y <= 1).
I know it sounds simple, I can do it with "if" statements bu
On 10/25/2011 09:27 PM, Florian Weiler wrote:
Dear all,
I have a problem with my stacked bar charts. I have one very long bar, hence
I would like to break the x-axis at a certain point so that the shorter bars
can be seen better.
Here is a cooked up example:
library(lattice)
group<- rep(1:3,10)
On Oct 25, 2011, at 12:38 AM, Jie TANG wrote:
> -- Forwarded message --
> From: Jie TANG
> Date: 2011/10/25
> Subject: how can I install the latest version of r in linux?
> To: r-help@r-project.org
>
>
> HI R-users
> I downloaded the latest version of R with the name R-latest.t
This may be an unnecessary aside, but other than obfuscating code or
allowing people to never stop thinking in C and start thinking in R,
what practical purpose would this package serve in an R context?
Michael
On Mon, Oct 24, 2011 at 11:31 PM, Ben Bolker wrote:
> Md Desa, Zairul Nor Deana Binti
On Oct 24, 2011, at 11:18 PM, hongwm wrote:
> Dear Marc,
>
> I would also like to request the R code for doing this nominal measure of
> association analyses, thanks in advance. Your kindly helps are really
> appreciated.
>
> My email is hon...@mun.ca
>
> Have a great day,
> Hong
Hong, if you
Hi everybody,
I would like to know whether it is possible to compare to tables for certain
parameters.
I have these two tables:
gene table
name chr start end str accession Length
gen1 4 646752 646838 + MI0005806 86
gen12 2L 243035 243141
Dear all,
I have a problem with my stacked bar charts. I have one very long bar, hence
I would like to break the x-axis at a certain point so that the shorter bars
can be seen better.
Here is a cooked up example:
library(lattice)
group <- rep(1:3,10)
x <- runif(30, 0, 100)
y <- runif(30, 0, 100)
Hi,
I was wondering if it is possible to lock a package to a specific
version of R. Dependency attribute in the package DESCRIPTION
only accepts >= AFAIU
(http://cran.r-project.org/doc/manuals/R-exts.html#fn-3 )
Any work around?
Thanks,
Mehmet
LEGAL NOTICE
This message is intended for the use
84 matches
Mail list logo