*..plus I get the following message after reading the whole set (all 7
columns):*
> read.csv.ffdf(file=csvfile, header=FALSE, skip=100, first.rows=1000,
> next.rows=1e7, VERBOSE=TRUE)
read.table.ffdf 1..1000 (1000) csv-read=0.02sec ffdf-write=0.08sec
read.table.ffdf 1001..10001000 (1000) cs
Dear Jan, thank you for your answer.
I am basically following the code Ive been using with read.table, where
x.class <- c('NULL', 'numeric','NULL','NULL','NULL', 'NULL', 'NULL')
has been working fine.
Reading all columns works with me but take much longer than allowed time
constrains.. (460 such
*Dear R users, Ive just started using the ff package.
There is a csv file (~4Gb) with 7 columns and 6e+7 rows. I want to read only
column from the file, skipping the first 100 rows.
Below Ive provided different outcomes, which will clarify my problem
*
> sessionInfo()
R version 2.14.2 (2012-02-29)
Dear R users,
given a simple plotting procedure below, how can I make the figures changing
on a slower rate (say every 2 sec)
for(i in 1:100){ts.plot(rnorm(i))}
Best, robert
--
View this message in context:
http://r.789695.n4.nabble.com/time-my-process-tp4514836p4514836.html
Sent from the R he
right,
Table <- data.frame(matrix(0,8,3))
day = "Monday"
Table[1,1]=day
Table[1,2]=3
works, thanks a lot. robert
--
View this message in context:
http://r.789695.n4.nabble.com/not-complete-character-in-csv-file-tp4185785p4186639.html
Sent from the R help mailing list archive at Nabble.com.
__
Indeed in txt it looks fine. Anyway, I must stay without 0 because csv is THE
format.
I got another question. why for
Table <- matrix(0,8,3)
day = "Monday"
Table[1,1]=day
all other elements become characters too?
Thanks, robert
--
View this message in context:
http://r.789695.n4.nabble.com/n
Dear R users, I got the following problem. Given that
> data[3,2]
[1] "010252"
Code:
intro <- data.frame()
intro[1,1] <- as.character(data[3,2])
write.csv(intro, file='intro.csv')
In 'intro.csv' file I am loosing the 0 in frot of 10252, which I need. Is
there a way to keep the full character sav
Thanks for help. Ive already sorted this out.
robert
--
View this message in context:
http://r.789695.n4.nabble.com/split-date-nad-time-tp4164191p4185788.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
ok,
> dput(AggDateTime[960:962])
structure(c(1314313140L, 1314313200L, 1314313260L), class = c("POSIXct",
"POSIXt"), tzone = "")
--
View this message in context:
http://r.789695.n4.nabble.com/split-date-nad-time-tp4164191p4165378.html
Sent from the R help mailing list archive at Nabble.com.
Dear R Users,
given that:
> AggDateTime[960:962]
[1] "2011-08-25 23:59:00 BST" "2011-08-26 00:00:00 BST"
[3] "2011-08-26 00:01:00 BST"
> unlist(strsplit(as.character(AggDateTime[960])," ", fixed=TRUE))
[1] "2011-08-25" "23:59:00"
> unlist(strsplit(as.character(AggDateTime[962])," ", fixed=TRU
Dear R useres, got the following problem. Given the AggData (listed below)
I need to plot AggData[,2] vs time (AggData[,1]) for chosen 'rows'. Ive done
already:
plot(AggData[rows,2], xaxt='n')
axis(1,at=seq(1,length(rows),1),sub("","", AggData[rows,1]))
which works, but I need to list only chose
Thanks for the answer. I found that smth like below works
subset <- c(1,0,0)
series <- c(1,1,1,0,1,0,0,1,1,0,0,0,0,1)
subset1 <- paste(subset, collapse='')
series1 <- paste(series, collapse='')
xx <- gregexpr(subset1, series1, fixed=TRUE)
as.numeric(xx[[1]]) ## yields the first element numbers i
Dear R Users, I am curious whether there is any simple solution o my problem.
My example 'series':
series <- c(1,1,1,0,1,0,0,1,1,0,0,0,0,1)
My 'subset' of interest:
subset <- c(0,0,0,0)
Is there any function which tells me that the subset exists in my series,
and gives me position where in serie
Dear R users, need help with my heatmap. I will really approciate some help.
Given the matrix:
> head(x)
A B C D time
[1,] 0 8 0 01
[2,] 0 160 0 02
[3,] 0 175 0 03
[4,] 0 253 0 04
[5,] 79 212 0 05
[6,] 6 105 0 06
and call:
## Heatmap ---
Dear R users,
I got date and time as two separate characters
[1] "2008-04-11"
[1] "22:00:00"
which correspond to my starting point in time domain.
Now I need to produce series over, 5 sec epochs up to end point, say:
[1] "2008-04-12"
[1] "23:00:00"
So something like
2008-04-11 22:00:00
2008-0
Hi, when ploting Kaplan-Meier estimate curves as below, the censoring symbols
(crosses) to not change thickness along the lines
plot(survfit(surv ~ I(x>=cut.off) ),lty=c(1,2), lwd=2)
is there any strightforward way to make it happen? thanks
robert
--
View this message in context:
http://r.789
Dear R users, simple figure:
postscript(file="~/Desktop/figure.ps", horizontal=T, width=20, height=10)
par(mfcol=c(2,5))
plot(rnorm(100), type='l')
plot(rnorm(100), type='l')
plot(rnorm(100), type='l')
plot(rnorm(100), type='l')
plot(rnorm(100), type='l')
##-
plot(rnorm(100), type='l')
plot(
Thanks David, works fine!
robert
--
View this message in context:
http://r.789695.n4.nabble.com/legend-tp2550747p2715250.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
Hi,
there is a function to plot survival curves:
library(survival)
plot.KM <- function(survival, x, x_cut.off, main='', label='')
{
plot(survfit(survival ~ I(x >= x_cut.off)), main=main)
legend('bottomleft', c(expression(label >= x_cut.off),expression(label <
x_cut.off)))
}
Now, I need to determ
One more question, given that
plot(rnorm(1),rnorm(1), ylab=expression(a~b >= 3), cex.lab=1.2)
then sign >= seems to be smaller than the rest, seems like cex.lab=1.2
affects only the text in ylab.
1) Is there any way to alter its size to follow the size of the whole
expression? It works nice for
Thanks for replying, indeed works.
I forgot to mention that I am looking for a 'transparent shading' s.t. the
plot symbols are still visible on the shaded area.
robert
--
View this message in context:
http://r.789695.n4.nabble.com/shade-area-between-ablines-tp2537352p2537479.html
Sent from the
Hi, want to shade the area between dotted lines:
x=c(1,5);y=c(1,5)
plot(y~x, type='n')
abline(v=c(2,3), lty=2)
sometnig simple needed. tried with polygon
thx, robert
--
View this message in context:
http://r.789695.n4.nabble.com/shade-area-between-ablines-tp2537352p2537352.html
Sent fro
thanks a lot!
--
View this message in context:
http://r.789695.n4.nabble.com/xlab-with-text-and-expression-tp2535732p2535785.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailma
Dear R users, say
plot(rnorm(1)~rnorm(1), xlab=paste('abc', expression(x>=1)),
I want proper sign of weak inequality not just '>='
will appreciate!
robert
--
View this message in context:
http://r.789695.n4.nabble.com/xlab-with-text-and-expression-tp2535732p2535732.html
Sent from the R help ma
Hi, say there are x and y given as:
level x y
3 0.112 0.012
2 0.432 0.111
1 0.415 0.053
3 0.380.005
2 0.607 0.01
1 NA NA
3 0.572 0.01
2 0.697 0.039
1 0.377 0.006
3 NA NA
2 0.571 0.003
1 0
Hi, using scatterplot in 'car' package.
There are 4 plots to be pictured together (ignore data used):
library(car)
par(mfrow=c(3,1))
ts.plot(rnorm(100))
ts.plot(rnorm(100))
scatterplot(rnorm(100),rnorm(100),boxplot="",smooth=T) # scatter with
non-parametric fit
problem is that the last one come
Thank you for response. The problem is that using return(y1) in my function
formula always returns y1, but what I want is to return it only when I wish,
like p.value in
t.test(rnorm(100),rnorm(100))$p.value
robert
--
View this message in context:
http://n4.nabble.com/retrieve-from-function-tp15
Hi, say I got the function:
> x=function(nbr){y<-rnorm(nbr);y1 <- mean(y);plot(y)}
how can I retrieve value of y1, when I need it.
I don't want:
> x=function(nbr){y<-rnorm(nbr);y1 <<- mean(y);plot(y)}
> y1
I want someting like:
"x$y1" and then I get the value
Many thanks, robert
--
View
Hi, do you have any suggestions how to make 3D scatterplot, BUT under linux.
Worth mentioning is the fact that 'scatterplot3d' does not load under Ubuntu
8.10.
Do you know any alternatives?? I tried cloud or persp but X,Y and Z axes are
emprical in my case, and cannot be replaced by any seq(...).
Hi, I wrote the function which outputs a matrix 'c' and a single value 'd',
as follows (simplified example):
procedure <- function(a,b){
...
list(c,d)
}
now I want to use 'c' and 'd' in code as follows:
d <- matrix(0,1,1)
value <- procedure(a,b)
and d[1,1] <- value[2] breaks telling that:
Error in
Hi , I want to use the read.table to the following example 'data.txt' format:
a b c d e f
SPX LSZ 100 C 0 34.4
SPX LSZ 100 P 0 1.3
SPX LSZ 105 C 0 30.3
SPX LSZ 105 P 0 1.85
SPX
Hi, I would like to check which rows of 'types.prev' matrix pop up in
'types', following R in-built procedure. I tried 'match' function but it
works in case of the one dimensional vectors.
Will appreciate any suggestions.
best, robert
> types
edateK
[1,] 20060819 12.5
[2,] 200
Hi, my data consists of 2 columns: one with the 'year' when daily observation
was recorded, the other one consists these observations 'obs', like the
following:
year obs
[3014,] 86 26.01
[3015,] 86 25.66
[3016,] 86 23.92
[3017,] 86 23.84
.
.
[3018,] 96 22.65
[3019,] 96 23.22
[3020,
Hi, my question concerns the following (guess) easy case. I have daily data
over 5-year period say
199017.24
199018.19
199019.22
.
.
199120.11
199120.26
199122.2
.
.
199420.05
199424.64
199426.34
and I want to make ts.plot of the 2nd column with respect to year
t;> optim(par=c(1,1), f3)
> Error in f1(theta, theta1) : object "theta" not found
>>
>
> You seem to be confusing your formal and actual parameters.
>
> When you invoke f3 (within optim()), theta is not defined within f3().
>
> Ray
>
> On Fri, 30 May 2008
Ray Brownrigg-2 wrote:
>
> On Wed, 23 Apr 2008, threshold wrote:
>> Hi, here comes my problem, say I have the following functions (example
>> case) #
>> function1 <- function (x, theta)
>> {a <-
Hi I am using ubuntu 8.04 and faced some problems when installing rJava. What
I did first was install.packages("rJava") but I could not proceed since:
"checking Java support in R... configure: error: absent
R was configured without Java support. Please run
R CMD javareconf
as root to add Java supp
Hi, I work on the date format: mmdd. I would like to calculate the number
of (working or trading) days between two of such specified dates in specific
year at US stock exchange OR at least with respect to 252-days year.
What I did so far was the conversion (example):
x<-20060213; y<-20060402
Hi, here comes my problem, say I have the following functions (example case)
#
function1 <- function (x, theta)
{a <- theta[1] ( 1 - exp(-theta[2]) ) * theta[3] )
b <- x * theta[1] / theta[3]^2
return( list( a = a, b = b )) }
#
HI, pretty basic question: is that possible to change the code of the
function within library? If so what should I do? I work on R linux (ubuntu),
thanks a lot
--
View this message in context:
http://www.nabble.com/Change-the-core-code-tp16808285p16808285.html
Sent from the R help mailing list
Hi, maybe my question is not typical. I want to make R table-kind output to
be readable immediately in Latex but I am struggling with symbol '\' needed
for instance in '\hline'. For example when 'Table' is a matrix class object:
cat("&",Table[1,1], "&",Table[1,2], "\n");flush.console()
cat("\hli
Hi, guess my problem has simple solution.
I want to extract ONLY Std. Errors of Max. Lik. estimates
(my_fit<-mle(object,...)), the same as I can do with estimates by:
x<-as. matrix(coef(my_fit)).
I could not find any function similar to 'coef(my_fit)', which extracts only
Standard Errors. So far
Hi, there is following issue, which I encounter when doing data analysis. Say
we have data in form of the matrix x:
> x
[,1] [,2] [,3]
[1,] 0.14 10
[2,] 0.25 11
[3,] 0.15 12
[4,] 0.16 13
[5,] 0.24 14
[6,] 0.35 16
now I want to do surface plot of x[,
Hi, I want to sort my matrix according to (any) selected column. For example
given matrix:
> x
[,1] [,2] [,3]
[1,]347
[2,]258
[3,]169
I want to sort the first column in ascending order and make the other
columns follow the 'new order' like:
> x1
[,1]
Hi All, simple question:
do you know how to graph the following object/matrix in a 'surface manner':
[,1] [,2] [,3][,4] [,5][,6]
[1,] -0.154 -0.065 0.129 0.637 0.780 0.221
[2,] 0.236 0.580 0.448 0.729 0.859 0.475
[3,] 0.401 0.506 0.310 0.650 0.822 0.448
[4,] 0.54
Hi, I deal with 3D array say:
, , 1
[,1] [,2] [,3] [,4] [,5]
[1,]147 10 13
[2,]258 11 14
[3,]369 12 15
, , 2
[,1] [,2] [,3] [,4] [,5]
[1,] 16 19 22 25 28
[2,] 17 20 23 26 29
[3,] 18 21 24 27 30
, , 3
Hi, my problem belongs to the basic ones. I want to get cumulated sum over
the matrix columns by one command (if such exists). Ordinary R's cumsum(x)
when x is:
[,1] [,2]
[1,]15
[2,]26
[3,]37
[4,]48
yields: 1 3 6 10 15 21 28 36
I want:
[,1] [,2]
[1,]
Hi,
I just installed jEdit but have no clue, whether I can run my code a'la
"ctrl-R" directly from jEdit script, or should source it from R command
line, after saving it first in jEdit.
thanks for any help,
rob
--
View this message in context:
http://www.nabble.com/jEdit-for-R-tf4684065.html#a1
48 matches
Mail list logo