There have been a couple of threads recently on proper usage of POSIXct. I
suggest you read the archives.
After you read the archives: In your case, you don't seem to have zone offset
data in your time info, so you probably need to use Sys.setenv to set an
appropriate default time zone. The NA
HI,
It may be better to provide an example dataset using ?dput().
dput(head(dataset),20)
Try:
signal3<- ifelse(t.tr=="Pst 24", signal2-17.29, ifelse(t.tr=="Pst 48", signal2
- 43.93256, etc.))
A.K.
- Original Message -
From: "Fethe, Michael"
To: "r-help@r-project.org"
Cc:
Sent:
Hi,
Could you try:
time<-data.frame(date,hour,stringsAsFactors=FALSE)
time$convert<-as.POSIXct(paste(time[,1],time[,2]),format="%Y/%m/%d
%H:%M:%S")
head(time)
# date hour convert
#1 2012/10/21 00:02:38 2012-10-21 00:02:38
#2 2012/10/21 00:11:05 2012-10-21 00:11:05
#3 2012/
HI,
Couldn't reproduce the problem. I am using R 3.0.1.
time$convert<-as.POSIXct(paste(time[,1],time[,2]),format="%Y/%m/%d %H:%M:%S")
time
date hour convert
1 2012/10/21 00:02:38 2012-10-21 00:02:38
2 2012/10/21 00:11:05 2012-10-21 00:11:05
3 2012/10/21 00:19:33 201
Hi Duncan,
Thanks for the reply - my apologies: my example data set was definitely
overly complex, and the labels too abstract. I'd really like to provide
labels for the assignments on the axis ("species" in the new example
below), and I'm not sure how I could accomplish this using your approach.
Hi all,
I'm running an if else loop to normalize my data to a known control.
I have calculated values that need to be subtracted from each treatment
applied. I'm trying this within a for loop with if and else commands to apply
to correct subtraction. This is done as follows:
attach(data.2013)
I have a multi-panel lattice figure. It has an even number of equal-width
columns. I would like to center text across the columns.
The xlab argument often handles this job nicely. But I want a more flexible
solution. (I have many strings and want to position them at different heights,
but alwa
Hello everyone,
I'm having a big trouble with which seems to be a bug in as.POSIXct()
date-time conversion. I have massive GPS datasets in which each location
has it's own date and time attribute. As I convert them to POSIXct format,
1300 cases (of about half a million locations) simply return NA
I am regressing a gene on another gene subset. Then I use stepAIC to reduce
the number of explanatory genes. How do I get the index of the NON-omitted
variables, so that I could analyse them?
gene_subset=c(y=genes[,i], genes[,other_genes]);
reduced_model=stepAIC(y~.,data=gene_subset,trace=
Hello, I am quite a novice when it comes to predictive modelling, so
would like to see where my particular problem might lie in the spectrum
of problems that you collectively have seen in your experiences.
Background: I have been handed a piece of software that uses a kohonen
SOM network to an
Please don't cross post [1].
Please post minimal example data only. You should not be trying to (or
appearing to) use us to get your work done.
[1] http://www.r-project.org/mail.html
---
Jeff Newmiller
Dear all,
I'm writing my manuscript to publish after analysis my final data with
ANOVA, ANCOVA, MANCOVA. In a section of my result, I did correlation of my
data (2 categirical factors with 2 levels: Quantity & Quality; 2 dependent
var: Irid.area & Casa.PC1, and 1 co-var: SL). But as some traits (h
Hi,
It's not clear what you really wanted. May be this helps:
dat1<- read.table(text="
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21
V22 V23 V24 V25 V26
1 1 1 3 1 NA NA 1 NA NA 1 2 7 5 3 2 1.0 15 17 5 1
NA 1 2 19 1 1
2
On 08/24/2013 08:25 PM, Jim Lemon wrote:
> ...
Oops, very bad editing of the function in the email - this should work:
lags <- function(x, k=1, prefix='lag', by) {
if(missing(by)) {
n <- length(x)
res <- data.frame(lag0=x)
for (i in 1:k) {
res <- cbind(res, c(rep(NA, i), x[1:(n-i)]))
On 08/26/2013 01:09 AM, Sudheer Joseph wrote:
Attached is a plot with a time series. If I have a time series object in R.
How do I get the plot in the attached format of time axis?. When I issue
plot(ts) I get a time series plot with tic only for years.
Hi Sudheer,
If your problem is similar t
Forgot the year on the plot:
n <- 100
x <- data.frame(time = seq(from = as.Date('2010-1-1')
, to = as.Date('2012-1-1')
, length = n
)
, val = runif(n)
)
plot(x$time, x$val, type = 'l', main = 'Default')
# now
Try this:
n <- 100
x <- data.frame(time = seq(from = as.Date('2010-1-1')
, to = as.Date('2012-1-1')
, length = n
)
, val = runif(n)
)
plot(x$time, x$val, type = 'l', main = 'Default')
# now plot with your own
Greetings R Community,
I am attempting to make sure a parent package passes all CRAN checks for the
dev version (R Under development (unstable) (2013-08-24 r63687) -- "Unsuffered
Consequences"). The parent package I'm compiling relies on another package
that is purely a dataset package as reco
Greeting R Community,
Greetings R Community,
I am attempting to make sure a parent package passes all CRAN checks for the
dev version (R Under development (unstable) (2013-08-24 r63687) -- "Unsuffered
Consequences"). The parent package I'm compiling relies on another package
that is purely a
On 25/08/2013 18:55, Christofer Bogaso wrote:
Hello again,
I need to install Rmpi package from this
http://www.stats.uwo.ca/faculty/yu/Rmpi/download/windows/MPICH2
I was wondering if there is any direct way to install this in R. The
No, because it is not a proper R repository. In particular,
Hello again,
I need to install Rmpi package from this
http://www.stats.uwo.ca/faculty/yu/Rmpi/download/windows/MPICH2
I was wondering if there is any direct way to install this in R. The
trivial method would obviously be download and save the required zip file
in the local disk and install it fro
Greetings,
This is more of an explanation question but I was using the colAUC function
on the iris dataset and everything works smoothly. This provides the AUC
for each pairwise comparison. I decided to do the actual subset for one of
the comparisons and the numbers are different (.9326 v. .9152
#or you could try:
lst2<- split(dat1,as.numeric(gl(69,69,2000)))
# identical(lst1,lst2)
#[1] TRUE
A.K.
- Original Message -
From: arun
To: R help
Cc:
Sent: Sunday, August 25, 2013 1:17 PM
Subject: Re: sbusetting data by rows (every 69 rows)
Hi,
Try:
set.seed(24)
dat1<- as.data.f
There was not attached plot or data. Plot without the x-axis (probably
xaxt = 'n') and then use "axis" to create your own ticks. It would be
helpful if you had supplied data using 'dput'.
On Sun, Aug 25, 2013 at 11:09 AM, Sudheer Joseph wrote:
> Attached is a plot with a time series. If I hav
On 8/25/2013 8:42 AM, Jeff Newmiller wrote:
That is only useful when converting numeric seconds to POSIXct, which I avoid
doing if at all possible. This discussion is about converting datetime strings
to POSIXct.
Thanks. Please excuse me for jumping in the middle without
reading the
Thank yos so muchIt helped a lot :)
On Sun, Aug 25, 2013 at 8:18 AM, arun kirshna [via R] <
ml-node+s789695n4674468...@n4.nabble.com> wrote:
> Hi,
>
> May be this helps:
> #Creating some dummy data.
>
> set.seed(24)
> lst1<-lapply(1:8,function(x) ts(sample(1:25,20,replace=TRUE)))
> set.seed(
Attached is a plot with a time series. If I have a time series object in R.
How do I get the plot in the attached format of time axis?. When I issue
plot(ts) I get a time series plot with tic only for years.
--
with best regards
Sudheer
*
thank you so much :)
On Sun, Aug 25, 2013 at 7:48 AM, arun kirshna [via R] <
ml-node+s789695n4674466...@n4.nabble.com> wrote:
>
>
> Hi,
> Try this:
>
> sapply(lst1,function(x) with(x,cor(CF,OSA)))
> # 2231 2232 2233
> #-0.9607689 -1.000 0.9973233
> #or
> library(plyr)
> dd
Hi Noah
All the categories have masked what is going on. I coverted some
columns to factors and replotted
tab$Label <- sapply(tab$label, pmatch, sort(unique(as.character(tab$label
tab$Assign <- as.numeric(sub("[^0-9]+","",as.character(tab$assignment)))
To get a look try
xyplot(freq ~ Assig
That is only useful when converting numeric seconds to POSIXct, which I avoid
doing if at all possible. This discussion is about converting datetime strings
to POSIXct.
---
Jeff NewmillerThe .
On 08/24/2013 04:50 AM, Robin Mjelle wrote:
after updating R and edgeR I lost the annotations in the final
Diff.Expressed matrix (toptags) when running the edgeR pipeline. How do I
get the row.names from the data matrix into the topTag-matrix?
data <- read.table("KO_and_WT_Summary_miRNA_Expressi
Thanks for those tips, Spencer. Will look at the code. That behavior is what I
would have expected in my naïveté .
--
David.
Sent from my iPhone
On Aug 25, 2013, at 7:56 AM, Spencer Graves
wrote:
> Is as.POSIXct1970{fda} useful here? That provides 1970-01-01 as the origin
> for as.POSIXct.
Ha Guillaume,
Is this what you are looking for?
#---
x1<-sample(1:10,5,replace=FALSE)
x2<-sample(1:10,100,replace=TRUE)
#This
tapply(x1,1:5,FUN=function(i){which(x2==i)})
#or this
tapply(x1,x1,FUN=function(i){which(x2==i)})
#---
Gerrit
___
If by fitted values corresponding to each predictor you mean the regression
coefficients , then use
coef(ft)
--
David.
Sent from my iPhone
On Aug 24, 2013, at 6:43 AM, alR wrote:
> I have fitted a multiple regression model to the row of a matrix using lm:
>
> ft<-lm(datos[i, ]-r1 + r2+ r3
Hi Earl,
Have you read the libCurl documentation for CURLOPT_COOKIEJAR? :
Pass a file name as char *, zero terminated. This will make libcurl
write all internally known cookies to the specified file when
curl_easy_cleanup(3)is called. If no cookies are known, no file will
be created. Specify "-"
Is as.POSIXct1970{fda} useful here? That provides 1970-01-01 as the
origin for as.POSIXct.numeric. Spencer
p.s. as.Date1970{Ecdat} does the same for as.Date.numeric.
On 8/25/2013 7:35 AM, Jeff Newmiller wrote:
If the data you are reading contains timestamp information from multiple time zon
If the data you are reading contains timestamp information from multiple time
zones in one field, then each time value needs to specify its own time offset.
In most cases I encounter, each data set corresponds to it's own time zone. For
importing the latter, using Sys.setenv() with a supported (
Note that this message is cross-posted in cross-validated ...
http://stats.stackexchange.com/questions/68250/selection-of-regressors
Jean
On Sat, Aug 24, 2013 at 11:48 AM, beginner wrote:
> I have a question about the package leaps which I am using for model
> selection.
>
> I would like to co
Dear list,
I am trying to compile R on a 64-bit Ubuntu 13.04 machine and get the
following error:
make[2]: Entering directory
`/home/kaiyin/opt/R-2.15.0/src/library/Recommended'
begin installing recommended package MASS
Error in untar2(tarfile, files, list, exdir) : incomplete block on file
make[
On 25-08-2013, at 08:45, Prof Brian Ripley wrote:
> On 25/08/2013 06:12, Berend Hasselman wrote:
>>
>> On 24-08-2013, at 23:13, Sebastian Hersberger
>> wrote:
>>
>>> Thanks. I restate my problem/question and hope its better understandable
>>> now.
>>>
>>> Let us define A and B as kxk matri
Dear Professor, thank you very much your suggestion. Yes, the real problem
is the speed. I will check and try to understand how to use that R
package, although it seems that it requires some knowledge of C++.
Thank you very much once again,
gul
> The only reason to use one of the apply famil
R-helpers,
When I use cURL in the Terminal:
curl --cookie-jar cookie.txt --url "http://corpusdelespanol.org/x.asp";
--user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0)
Gecko/20100101 Firefox/23.0" --location --include
a cookie file "cookie.txt" is saved to my working directory.
42 matches
Mail list logo