i'm trying to convert a zoo object of the following specifications:
str(z)
atomic [1:15642] 0 0 0 0 0 0 0 0 0 0 ...
- attr(*, index)='POSIXct', format: chr [1:15642] 2004-09-01 02:00:00
2004-09-01 03:00:00 2004-09-01 04:00:00 2004-09-01 05:00:00 ...
- attr(*, frequency)= num 0.000278
to
On Thu, 23 Aug 2007 [EMAIL PROTECTED] wrote:
i'm trying to convert a zoo object of the following specifications:
str(z)
atomic [1:15642] 0 0 0 0 0 0 0 0 0 0 ...
- attr(*, index)='POSIXct', format: chr [1:15642] 2004-09-01 02:00:00
2004-09-01 03:00:00 2004-09-01 04:00:00 2004-09-01
Thanks for the inputs, but it's not exactly what I want...
My problem is, that my timeseries (precipitation) contain lots of NA-values
and when I apply the code:
z- data.frame(a=p1$time.date, precip=p1$m1)
#gives a dataframe with precipitation and time (2004-01-01 02:12:00)
z-
On Thu, 23 Aug 2007, Marc Gilgen wrote:
Thanks for the inputs, but it's not exactly what I want...
You did not provide sufficient information. In particular, you still do
not provide a small reproducible example.
My problem is, that my timeseries (precipitation) contain lots of NA-values
Dear all,
I would need a function which convert small letter into capital letter (at
least the first letter of a character variable).
Does such a function exist in R ?
Thanks by advance
Jessica
__
R-help@stat.math.ethz.ch mailing list
Try ?toupper
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 12:11 PM
To: R-help@stat.math.ethz.ch
Subject: [R] conversion into capital letter
Dear all,
I would need a function which convert small letter
help(toupper)
b
On May 15, 2007, at 2:41 AM, [EMAIL PROTECTED] wrote:
Dear all,
I would need a function which convert small letter into capital
letter (at
least the first letter of a character variable).
Does such a function exist in R ?
Thanks by advance
Jessica
--
Benilton
On Tue, 2007-05-15 at 08:41 +0200, [EMAIL PROTECTED] wrote:
Dear all,
I would need a function which convert small letter into capital letter (at
least the first letter of a character variable).
Does such a function exist in R ?
Thanks by advance
Jessica
See ?toupper and take note
Hello, Andreas
I'm glad the previous replies helped you solve your problem.
I think your original problem, though,
was caused by a typo. Note
the comma between the month and the year in your script and
the
period between the month and the year in Jim Holtman's
script.
From Jim Holtman:
Hi,
I'm on my very first steps to R and so I hope that I do
not ask a really stupid questions but I did not found it
via R-Search, in the FAQ or Google (BTW, the name R is
not a really good seekiong criterion ;-) ).
I have a data file containing a table that containes
dates and values like
Here is how you can convert them to a Date object:
x - c('01.03.2007','02.03.2007','03.03.2007')
y - as.Date(x, format=%d.%m.%Y)
y
[1] 2007-03-01 2007-03-02 2007-03-03
str(y)
Class 'Date' num [1:3] 13573 13574 13575
On 3/23/07, Andreas Tille [EMAIL PROTECTED] wrote:
Hi,
I'm on my
On Fri, 23 Mar 2007, jim holtman wrote:
Here is how you can convert them to a Date object:
x - c('01.03.2007','02.03.2007','03.03.2007')
y - as.Date(x, format=%d.%m.%Y)
y
Well, this is what I tried when reading the docs, but
mydata - read.csv(file='mydata.dat', sep = '\t', quote='',
Read the help desk article in R-News 4/1 and see
?as.Date
?strptime (for setting the as.Date format= argument)
Also, you might be interested in the zoo package
library(zoo)
?read.zoo
vignette(zoo)
vignette(zoo-quickref)
On 3/23/07, Andreas Tille [EMAIL PROTECTED] wrote:
Hi,
I'm on my very
Hi Andreas,
Welcome to r-help :)
On 23 March 2007 at 22:21, Andreas Tille wrote:
| I'm on my very first steps to R and so I hope that I do
| not ask a really stupid questions but I did not found it
| via R-Search, in the FAQ or Google (BTW, the name R is
| not a really good seekiong criterion
On Fri, 23 Mar 2007, Dirk Eddelbuettel wrote:
Nit 1: read.csv() is for csv files which tend to have , as a separator;
read.table() is more useful here.
Well, that's correct. read.csv was just a leftover from former
tests and finally it worked also this way - but thanks for the
hint anyway.
Hi R,
I have a matrix A,
A=
[,1] [,2]
[1,] a u
[2,] b v
[3,] c x
[4,] d x
[5,] e x
I want to put the 2nd column of this matrix in a vector without
duplicates. i.e., my vector v should be (u, v, x), whose length is 3.
Can anybody help me on this?
://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: Shubha Vishwanath Karanth [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Wednesday, January 24, 2007 2:12 PM
Subject: [R] Conversion of column matrix into a vector without
duplicates
Hi R,
I have
dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Shubha Vishwanath
Karanth
Verzonden: woensdag 24 januari 2007 14:13
Aan: r-help@stat.math.ethz.ch
Onderwerp: [R] Conversion of column matrix
Shubha Vishwanath Karanth wrote:
Hi R,
I have a matrix A,
A=
[,1] [,2]
[1,] a u
[2,] b v
[3,] c x
[4,] d x
[5,] e x
I want to put the 2nd column of this matrix in a vector without
duplicates. i.e., my vector v should be (u, v, x), whose length
Dear All
I am trying to convert from the type expression to the type
numeric. The following works:
x - expression(6.2)
as.numeric(as.character(x))
[1] 6.2
However, the following does not work:
x - expression(62/100)
as.numeric(as.character(x))
[1] NA
Warning message:
NAs introduced by
Paul Smith wrote:
x - expression(62/100)
as.numeric(as.character(x))
[1] NA
Warning message:
NAs introduced by coercion
Any idea about how to deal with the second case?
eval-uate the expression:
x - expression(62/100)
eval(x)
[1] 0.62
Barry
On 11/23/06, Barry Rowlingson [EMAIL PROTECTED] wrote:
x - expression(62/100)
as.numeric(as.character(x))
[1] NA
Warning message:
NAs introduced by coercion
Any idea about how to deal with the second case?
eval-uate the expression:
x - expression(62/100)
eval(x)
[1]
Paul Smith [EMAIL PROTECTED] writes:
Dear All
I am trying to convert from the type expression to the type
numeric. The following works:
x - expression(6.2)
as.numeric(as.character(x))
[1] 6.2
However, the following does not work:
x - expression(62/100)
On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:
I am trying to convert from the type expression to the type
numeric. The following works:
x - expression(6.2)
as.numeric(as.character(x))
[1] 6.2
However, the following does not work:
x -
On 11/23/06, Paul Smith [EMAIL PROTECTED] wrote:
On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:
I am trying to convert from the type expression to the type
numeric. The following works:
x - expression(6.2)
as.numeric(as.character(x))
[1] 6.2
Paul Smith [EMAIL PROTECTED] writes:
Thanks, Peter. I did not know about the existence of the command
'eval', in spite of the fact of having searched the Internet for a
solution for my problem.
'eval' seems not working in connection with Ryacas:
library(Ryacas)
x - yacas(2/3*5/7)
x
Also note that Ryacas provides an Eval which has a yacas method
that simplifies writing this:
library(Ryacas)
Eval(yacas(1/2))
See ?Eval
On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 11/23/06, Paul Smith [EMAIL PROTECTED] wrote:
On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard
Hi R-Users,
I have plotted a region whose polygon coordinates are given in shp format ED50
UTM (zone=30) ) using readShapePoly in library(maptools).
Now I need to plot a set of points in that region (my.dataframe, with X and Y
geographic coordinates), which have been read using GPS in
On Wed, 18 Oct 2006, Berta wrote:
Hi R-Users, I have plotted a region whose polygon coordinates are given
in shp format ED50 UTM (zone=30) ) using readShapePoly in
library(maptools).
Now I need to plot a set of points in that region (my.dataframe, with X
and Y geographic coordinates),
I would highly appreciate some hints regarding this issue.
Regards,
Dejan
_
From: Loncar, Dejan
Sent: 15 November 2005 10:32
To: 'r-help@stat.math.ethz.ch'
Subject: conversion from RData to R file
Dear all
I am beginner in
. Box
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Loncar, Dejan
Sent: Monday, November 21, 2005 8:22 AM
To: r-help@stat.math.ethz.ch
Subject: Re: [R] conversion from RData to R file
I would highly appreciate some hints regarding this issue
On 21-Nov-05 Berton Gunter wrote:
Please read the docs! -- especially An Introduction to R.
There is no need whatever to have your **data** in text format
(other than, perhaps, to read into into R), which is generally
what R format (a .R suffix in the filename, I presume) indicates.
I would
Dear all
I am beginner in R coding and have a problem to figure out how to
convert RData format into R format.
After I converted csv file using read.csv I got RData file but to run
some R code need R format
Many Thanks
Dejan
[[alternative HTML version deleted]]
On 11/15/05 4:31 AM, Loncar, Dejan [EMAIL PROTECTED] wrote:
Dear all
I am beginner in R coding and have a problem to figure out how to
convert RData format into R format.
After I converted csv file using read.csv I got RData file but to run
some R code need R format
You can simply load
Hi, I wonder if anybody could help me in converting
this easy SAS program into R.
(I'm still trying to do that!)
PROC IMPORT OUT= WORK.CHLA_italian
DATAFILE= C:\Documents and
Settings\carleal\My
Documents\REBECCA\stat\sas\Allnutrients.xls
DBMS=EXCEL2000 REPLACE;
alessandro carletti wrote:
Hi, I wonder if anybody could help me in converting
this easy SAS program into R.
(I'm still trying to do that!)
Converting that program into R will be very feasible and the solution
will be far more elegant than SAS. But I think you are expecting other
people to
Dear List,
How can I convert a list with elements being character strings, like:
c(1,2,3,4), “c(1,3,4,2) … to a list with elements as numerical
vectors: c(1,2,3,4), c(1,3,4,2)…?
Thanks!
Anna
__
R-help@stat.math.ethz.ch mailing list
Anna Oganyan wrote:
Dear List,
How can I convert a list with elements being character strings, like:
c(1,2,3,4), “c(1,3,4,2) … to a list with elements as numerical
vectors: c(1,2,3,4), c(1,3,4,2)…?
Thanks!
Anna
Try:
x - list(c(1,2,3,4), c(1,3,4,2))
lapply(x, function(x)
On Tue, 2005-06-28 at 17:23 -0400, Anna Oganyan wrote:
Dear List,
How can I convert a list with elements being character strings, like:
c(1,2,3,4), “c(1,3,4,2) … to a list with elements as numerical
vectors: c(1,2,3,4), c(1,3,4,2)…?
Thanks!
Anna
l - list(c(1,2,3,4), c(1,3,4,2))
l
[[1]]
as.numeric?
spencer graves
Anna Oganyan wrote:
Dear List,
How can I convert a list with elements being character strings, like:
c(1,2,3,4), “c(1,3,4,2) … to a list with elements as numerical
vectors: c(1,2,3,4), c(1,3,4,2)…?
Thanks!
Anna
Thank you all for your (fast) comments.
Unfortunately I could not make the advise work:
mass
[1] 800 800 800 800 800 800 800 800 800 800 800
800 800 800 800 800 800 800 910 910 910 910 910
910 910
[26] 910 910 910 910 910 910 910
Robin,
It will work if you use decimal points (not comma)
HTH
Koen
On 5/6/05, Smit, R. (Robin) (IenT) [EMAIL PROTECTED] wrote:
Thank you all for your (fast) comments.
Unfortunately I could not make the advise work:
mass
[1] 800 800 800 800 800 800 800 800 800 800
@stat.math.ethz.ch
Sent: Friday, May 06, 2005 2:17 PM
Subject: [R] conversion factor into numeric
Thank you all for your (fast) comments.
Unfortunately I could not make the advise work:
mass
[1] 800 800 800 800 800 800 800 800 800 800 800
800 800 800 800 800 800 800
://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
- Original Message - From: Smit, R. (Robin) (IenT)
[EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Friday, May 06, 2005 2:17 PM
Subject: [R] conversion factor into numeric
Thank you
Hi,
I was trying to compare differential expression data
from multiple studies ( 4 dataset downloaded from NCBI
GEO). The expression dataset are from Affy, as well as
cDNA (dual channel) platforms. Before I conduct
analysis, I have to map the gene IDs so that the
different genes are comparable.
Pankaj Chopra wrote:
Hi,
I was trying to compare differential expression data
from multiple studies ( 4 dataset downloaded from NCBI
GEO). The expression dataset are from Affy, as well as
cDNA (dual channel) platforms. Before I conduct
analysis, I have to map the gene IDs so that the
different
Chopra
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Conversion of Affy IDs , LocusLink IDs etc...
Pankaj Chopra wrote:
Hi,
I was trying to compare differential expression data
from multiple studies ( 4 dataset downloaded from NCBI
GEO). The expression dataset are from Affy, as well
Hi,
I am trying to convert a data.frame of numerics (this could be a matrix as well in
this case) into a data.frame of factors.
I did it in a way that is less than direct...
myforet2-t(myforet)
for (i in 1:length(myforet2[1,])) {
if (i == 1)myforetfact-list(as.factor(myforet2[,i]))
On Sat, 9 Oct 2004, Patrick Giraudoux wrote:
mydf[] - lapply(mydf, as.factor)
would appear to be what you want.
For a matrix, I presume you want a factor matrix as the result. Something
like
my - matrix(1:12, 3, 4)
dmy - dim(my)
my - as.factor(my)
dim(my) - dmy
my
which does not print as a
]
To: Patrick Giraudoux [EMAIL PROTECTED]
Cc: r-help [EMAIL PROTECTED]
Sent: Saturday, October 09, 2004 4:32 PM
Subject: Re: [R] conversion of a data.frame of numerics to a data.frame of factors
On Sat, 9 Oct 2004, Patrick Giraudoux wrote:
mydf[] - lapply(mydf, as.factor)
would appear
PROTECTED] On Behalf Of Mark Strivens
Sent: Thursday, September 09, 2004 7:26 PM
To: [EMAIL PROTECTED]
Subject: [R] R conversion
I am a newcomer to R trying to convert a SAS program to R.
Does anyone know if there is a functional equivalent of the
SAS 'Factor' procedure?
For example in SAS
Thanks John for the post - I had found factanal
However factanal it seems you have specify the number of factors to be
fitted
up front, whereas with the SAS procedure you don't - this is apparently
important
to the analysis!
Perhaps I could emulate this function by breaking it down using factor
Dear R-users
I got some matlab code (just a few lines) for the deconvolution of a
signal:
function q=Dconvolve(funct)
w=squeeze(size(funct)); % gets the length
t=0:3:(w(1,1)-1)*3;
h=Dehemo(t,1.25,3);
r=fft(h);
rinv = 1./r;
q = real(ifft( fft(funct(:)).*rinv(:)));
Recently on R-help there has been some discussion of the use of S4
classes and methods from the methods package in R. I will be
presenting a paper (joint work with Saikat DebRoy) at DSC-2003
entitled Converting a large R package to S4 classes and methods. A
preprint copy of the paper is now
DATA
I have data from two (or more) locations with ID: 'A' and 'B'
for three (or more) YEARS: 1999 to 2001
of two (or more) variables: VAR1, VAR2.
x
ID YEAR VAR1 VAR2
1 A 199992
2 B 199989
3 A 200023
4
55 matches
Mail list logo