Displaying 20 results from an estimated 8000 matches similar to: "problem with Dates"
2009 Jun 08
2
problem with bulk insert into a *.csv file
Hi all,
I am trying to create a "index.csv" with caliculating different
types of caliculations .
In that i have to caliculate on 10,000 studies and have to insert many no of
rows more than 500,000
for that right now I am inserting every row after caliculating and doing
data.frame
but its taking much time to create that index.csv
is there any thing like bulk insert in to file
2010 Mar 09
2
Problem with mean
Hi all,
I got one intresting problem with caliculating mean that is
while i am taking mean of values
*0.6, -0.8, 4, -3.8*
using
*val<-c(0.6, -0.8, 4, -3.8)*
*mean(val)*
it given result as
*2.775558e-17*
but the actual result is *"0"*
can any one suggest how can I get correct mean result in this case
can any one suggest how I can farward
thanks in regards
kiran
[[alternative
2009 Feb 02
2
parsing problem
Hi all,
I am trying to parse a vector for caliculating minimum in that vector the
vector having values like
1 Kontrolle
2 Placebo
3 125mg/kg
4 250mg/kg
5 500mg/kg
6 1000mg/kg
hear i tries for comverting it into numeric with using "as.numaric()"
function
but i got values like
5
6
2
3
4
1
it gives 1000mg/kg is the least one
but i have
2004 Jun 07
7
Vectors of years, months, and days to dates?
The interface for dates in R is a little confusing to me.
I want to create a vector of Date objects from vectors of years, months, and
days.
One solution I found is:
years <- c(1991, 1992)
months <- c(1, 10)
days <- c(1, 2)
dates <- as.Date(ISOdate(years, months, days))
But, in this solution the ISOdate function converts the vectors into
characters,
which can cause serious
2009 Jun 04
3
Getting a column of values from a list - think I'm doing it the hard way
Example code it shown below.
I think I am doing this the hard way. I'm just trying to get the full year value from an array of dates. An example array is shown below. Right now, I'm using a "for" loop to pull the year out of a list where the dates were split up into their individual components.
This seems to work, but just wondering if there is an easier way.
Thanks for
2013 Jul 04
2
how to choose dates data?
i have converted my data into date format like below:
> day=as.Date(originaldate,"%m/%d/%Y")
> day[1:5]
[1] "2008-04-12" "2011-07-02" "2011-09-02" "2008-04-12" "2008-04-12"
I wish to select only those observations from 2007 to 2009, how can I
select from this list?
[[alternative HTML version deleted]]
2001 May 18
1
NAs in chron objects
Dear All:
I am having some trouble with date variables when NAs are present. The
following example illustrates (see below for output of version):
> library(chron)
> minor.test <- c( "NA", "NA", "1988-02-08",
+ "1988-02-08", "NA", "1987-11-23", "1988-09-03", "1991-10-15",
+
2005 Jun 01
2
problem with chron scales in lattice
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year
labels from 1992 to 2004 for the x axis in the plot below, but instead
only a few of them appear, and in the wrong spots, as if the coordinate
system has changed after finishing with the panel function.
library(chron)
library(lattice)
# vertical grid
2010 Jun 22
3
Problem with writing a CSV file in UTF-8 formate
Hi all,
I have a problem with writing a *.CSV file in UTF-8 formate
I tried to write a dataframe named "dfPREINDX" to the new file named
"preindx.csv" in below formate
write.table(dfPREINDX,PreIndex,fileEncoding="UTF-8",sep="|",row.names=FALSE)
but its throed an error like
Error in write.table(dfPREINDX, "preindx.csv", fileEncoding =
2009 Oct 07
1
Formatting outputs:(chronological object)
Hello everyone,
I have a data generated in a way similar to the following
library(chron);library(zoo)
date<- seq(as.Date("1990-01-01"),, as.Date("2000-12-31"), by = 1)
obs<- zoo(rnorm(length(date), mean = 10, sd = 2.5), order.by = date)
monthly<- function(date) as.Date(as.yearmon(Date))
result<- data.frame ( Date = obs = aggregate(obs, monthly, sum))
Now,
I want
2004 Aug 06
3
official communication protocol definition / documentation?
Hello,
I am looking for a documentation of the communication protocolls icecast is
capable of: ICY, XAUDIOCAST and a modified HTTP. In order to write client
software being capable of all available features I was searching on the net
for those documentations but no luck so far. How come? Isn't this protocoll
documented? How does the developer team know what options and functins are
available
2006 Nov 23
1
how to loop this?
Hi,
I have the next procedure:
t1<-data.frame(table(substr(names(subset(lasker[[1]], lasker[[1]] >=
4)), 1, 7)))
t1[1:5,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
How to make a new list?, dataframe? having 189 elements in the 'lasker'
list:
> str(lasker[[1]])
'table' int [, 1:1274] 1 1 3 2 1 5 4 1 1 4 ...
-
2008 Oct 29
1
Subsetting data in a loop
I need some help with sub-setting my data. I am trying to divide a data frame into multiple data frames based on the year collected, and stored in a list with each new data frame labeled with "year X" where X is the year the data was collected. When I run my current code I get nine error messages stating
"In one_year[name] <- myear : number of items to replace is not a
2006 Nov 22
3
dataframe manipulation
Hi,
Having a dataframe 'l1' (dput output is below):
>dim(l1)
1274 2
>l1[1:12,]
Var1 Freq
1 1988-01-13 1
2 1988-01-16 1
3 1988-01-20 3
4 1988-01-25 2
5 1988-01-30 1
6 1988-02-01 5
7 1988-02-08 4
8 1988-02-14 1
9 1988-02-16 1
10 1988-02-18 4
11 1988-02-24 2
12 1988-03-04 1
I want to extract the times
2006 May 24
1
general Gauss-Newton or support for NSUR: contemporaneously correlated non-linear models
Dear r-Help readers,
1) Is there support for NSUR in some R package yet?
2) Is there a general function of applying the Gauss-Newton or Marquard
method, in which the function of calculating the partial derivatives can
be specified by the user?
Contemporaneously correlated non-linear models (NSUR) is a method to fit
a system of non-linear equations.
I want to use to fit several non-linear
2009 Jan 28
3
Newbie Question About Histograms
Hello everyone. Just have a question , cant figure out how to make this
histogram.
I have this table, that i stored in a variable name new.data2. Table looks
like this
Year GeoArea SmpNo Month Gear Maturity Length Age YearC
1989 1 362 10 22 1 225 1 1988
1991 1 267 10 10 1 191 1 1990
1991 1 267 10 10 1 202 1 1990
1992
2006 Nov 26
1
adding elemens to a list
Hi,
I have a list of 20 elements, each of them of variable length and with a
structure like this:
lasker[[1]][1:10,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
6 1988-07 1
7 1988-08 1
8 1988-09 1
9 1989-03 1
10 1989-04 1
How do I can insert in this list:
1988-01 0
1988-10 0
1988-11 0
1988-12 0
1989-01 0
2017 Jun 07
0
Determining which.max() within groups
cumsum() seems to be what you need.
This can probably be done more elegantly, but ...
out <- aggregate(Q ~ wyr, data = Daily, which.max)
tbl <- table(Daily$wyr)
out$Q <- out$Q + cumsum(c(0,tbl[-length(tbl)]))
out
## yields
wyr Q
1 1990 4
2 1991 6
3 1992 9
4 1993 15
5 1994 18
I leave the matter of Julian dates to you or others.
Cheers,
Bert
Bert Gunter
"The trouble
2017 Jun 07
4
Determining which.max() within groups
Using the dataset below, I got close to what I'm after, but not quite all
the way there. Any suggestions appreciated:
Daily <- read.table(textConnection(" Date wyr Q
1911-04-01 1990 4.530695
1911-04-02 1990 4.700596
1911-04-03 1990 4.898814
1911-04-04 1990 5.097032
1911-04-05 1991 5.295250
1911-04-06 1991 6.569508
1911-04-07 1991 5.861587
1911-04-08 1991 5.153666
2018 Jan 03
3
HOW TO FILTER DATA
Hello,
I have a data of Patents from OECD in delimited text format with IPC being
one column, I want to filter the data by selecting only certain IPC in that
column and delete other rows which do not have my required IPCs. Please,
can anybody guide me doing it, also the IPC codes are string variables.
The data is somewhat like below, but its a huge dataset containing more
than 11 million rows