Displaying 20 results from an estimated 3000 matches similar to: "segmentation fault with chron.times()"
2009 Mar 02
2
R-code help for filtering with for loop
Dear Sir / Madam,
I am new for R coding. Kindly help me out in sorting out the following problem.
There are 50 rows with six coloumns(you could see in the attached .txt file). I
wish to go for filtering this 50 rows for any one of the six coloumns
satisfying the value >= 64.
I need to have a final table with rows having >= 64 value in any one of the six
coloumns and the rest could be
2003 Oct 16
1
princomp with more coloumns than rows: why not?
As of R 1.7.0, princomp no longer accept matrices with more coloumns
than rows. I'm curious: Why was this decision made?
I work a lot with data where more coloumns than rows is more of a rule
than an exception (for instance spectroscopic data). To me, princomp
have two advantages above prcomp: 1) It has a predict method, and 2)
it has a biplot method.
A biplot method shouldn't be too
2011 Feb 08
2
Extrcat selected rows from a list
Hi,
I have two lists
1) List1- 30,000 rows and 104 columns
2) List2- a list of 14000 selected rownames from List 1
Now, I want to extract all the 104 columns of List1 matching with the 14000 selected rownames from List2.
Psedocode will be something like this:
match rownames(List2) with rownames(List1)
extract selected matched 104 coloumns from (List1)
strore in-> List3
So the
2001 Aug 02
1
Package GSS for interpolation in more than 2D?
Dear all,
There has been some time since I asked about interpolation in higher (>2)
dimensions, and I must admit I failed to write a function to do this
myself the last time, but eventually ended up doing it in MATLAB. I tried
to translate the MATLAB code, but MATLAB code is so much more opaque than
R (S) code, so I failed that too, mainly because I could only get one
MATLAB session, I would
2000 Feb 11
1
new chron problems in RW0990
Dear all,
In RW0901 I could
> dates("01/01/2000")
[1] 01/01/100
where only the printing was wrong, but the double numeric representation of
the chron object was calculated correctly
but now in RW0990
> dates("01/01/2000")
Error in fun(yy, ...) : must be 2-digit (numeric) year specification
and also the followig doesn't help
> dates("01/01/2000",
2005 Sep 16
2
help required on read.table
Hi all
i am facing a peculiar problem for data input using read.table which i
never faced previously.
i have a data file by name abnew.txt with two coloumns data as depicted below.
A B
420 422
314 321
the txt file is created using the excel save as option. i issued the
statement as
> a <- read.table("abnew.txt", header=TRUE)
> a
X.??S
1 NA
2 2
3 2
2000 Feb 16
1
chron and mysql
R 0.90.1
chron 2.2-2
MySQL 3.22.30
Attempts to create a chron object fail when using date and time data
from a mysql database. It appears that chron does not like 4 digit
years. Is this the problem?
my data look like:
> c.time[1:10,]
Date Time
1 2000-02-14 10:15:02
2 2000-02-14 10:17:03
3 2000-02-14 10:18:03
4 2000-02-14 10:19:03
5 2000-02-14 10:20:04
6 2000-02-14
2011 Feb 16
2
distance between consecutive points
Dear R users,
I have two coloumns of data, say x and y, referring to a list of
points in 2D space. I am trying to develop a code that will give me
the distances (using Pythagoras) between consecutive points (xi,yi)
and (xi+1,yi+1). So far I have come up with the following:
for (i in 1:length(x)) d<-sqrt((x[i+1]-x[i])^2+(y[i+1]-y[i])^2)
For example, if I use the two points (note, I have
2005 Nov 09
2
how to convert strings back to values?
Dear All,
It's Eszter from Hungary, a total beginner with R. My problem is the
following:
I have a dataset with binary values as a comma separated textfile. The
samples are in the coloumns and the species are in the rows.
I have to transpose it for the further PCoA analysis. There is no
problem with reading the dataset.
When I transpose the dataset, the original values become
2010 Feb 16
3
converting character vector "hh:mm" to chron or strptime 24 clock time vectors
Hi All,
I am attempting to work with some data from loggers. I have read in a
.csv exported from MS Access that already has my dates and times (in 24
clock format), (with StringsAsFactors=FALSE).
> head(tdata)
LogData date time
1 77.16 2008/04/24 02:00
2 61.78 2008/04/24 04:00
3 75.44 2008/04/24 06:00
4 89.43 2008/04/24
2012 Apr 30
2
Matrix transposition
Hi everyone.
I want to transpose a data frame. Lets say the following DF:
df = data.frame(matrix(ncol=4, nrow = 10))
df[,1] = c(rep(1,5),rep(2,5))
df[,2] = c(rep('a',4),rep('b',3),rep('c',3))
df[,3] = c(letters[5:14])
df[,4] = runif(10)
I would like to form a data frame with each line corresponding to colon X1
and create a variable with columns X2 and X3.
This would
2007 Apr 22
1
How to add e.g. lines to a zoo plot?
Hi all,
a problem I encounter again and again: I plot a zoo object using "plot"
and then want to add lines or points to this plot.
I usually circumvent this problem by adding artificial coloumns to the
zoo object before plotting, but I am sure there's a better solution.
To be specific: Assume I did
x <-
2011 Sep 16
1
Mystified - comparing chron times
I have two local variables: startTime and expectedStartTime. Both are chron
related objects.
When I look at the class for the objects I can see they are of class
"times".
When I print them to the console, they both read: "09:30:00"
When I print them as.numeric(), they both read: 0.3958333
When I try and compare them: (as.numeric(startTime) ==
as.numeric(expectedStartTime)) it
2005 Mar 11
1
reading in data problems
Hi
I have a dataset (.txt file and .dat file) in which the length of one
record is 144. There is no header in the .txt or .dat file itself. When I
read this file using the read.table command, and want to drop some
coloumns by setting the argument colClasses to "NULL" for the columns that
I want to drop, it does not work, because the entire record of the length
144 is being treated as
2004 May 12
1
convert.times in chron, error when 59 < seconds < 60 (PR#6878)
Full_Name: Dennis Wolf
Version: 1.9.0
OS: Mac OS 10.3.3
Submission from: (NULL) (160.91.76.23)
platform powerpc-apple-darwin6.8
arch powerpc
os darwin6.8
system powerpc, darwin6.8
status
major 1
minor 9.0
year 2004
month 04
day
2006 Jan 19
1
chron library: format.times, parse.format and h:m (PR#8507)
Due to the following lines in parse.format:
else if (nf == 3) {
sep <- ""
fmt <- substring(format, first = 1:3, last = 1:3)
}
If a format code has 3 characters, it will not use a separator:
> library(chron)
> mytime = times('7:15:00')
> format(mytime,'h:m')
[1] "0715"
- Phil Spector
2011 Jan 21
4
clustering fuzzy
hello,
i'm pete ,how can i order rows of matrix by max to min value?
I have a matrix of membership degrees, with 82 (i) rows and K coloumns, K
are clusters.
I need first and second largest elements of the i-th row.
for example
1 0.66 0.04 0.01 0.30
2 0.02 0.89 0.09 0.00
3 0.06 0.92 0.01 0.01
4 0.07 0.71 0.21 0.01
5 0.10 0.85 0.04 0.01
6 0.91 0.04 0.02 0.02
7 0.00 0.01 0.98 0.00
8 0.02
2012 Jun 01
1
Missing times chron
Dear all,
As a novice user of R I ran into a problem that's quite hard for me to
resolve. I have a database containing data of a clinical trial in which
patients are included that survived or died:
x <- matrix(data=c(1:5,0, "1/1/2012 00:00:00",0,0,"1/7/2012 00:00:00"),
nrow=5, ncol=2, dimnames= list(NULL,c("ID", "dateofdeath")))
My file is a .csv
2010 Jun 29
3
formating chron date times for printing
the date were created with chron with this argument
format=c(dates="Y/m/d", times="H:M:S"))
so I have the dates being displayed as
(10/06/22 12:00:00)
I would like to have them displayed as
"2010-06-22 12:00:00" or "%Y-%m-%d %H:%M:%S"
and then I can convert these for mergeing with another data frame
x <- (structure(c(14464, 14464.0104166667,
2006 Jun 23
2
problem with hist() for 'times' objects from 'chron' package
Hello dear useRs and wizaRds,
I encountered the following problem using the hist() method for the
'times' classes
from package 'chron'. You should be able to recreate it using the code:
library(chron)
# pasted from chron help file (?chron)
dts <- dates(c("02/27/92", "02/27/92", "01/14/92", "02/28/92",
"02/01/92"))
class(dts)