Displaying 20 results from an estimated 1000 matches similar to: "mtext bug"
2010 Jun 01
2
storing output data from a loop that has varying row numbers
Hi All,
I am trying to run a loop that will have varying numbers of rows with each
output.
Previously I have had the same number of rows so I would use (and I
appreciate that this will no doubt achieve some gasps as being thoroughly
inefficient!):
xdfrow<-(0)
xdfrow1<-(1:32)
xdfrow2<-(33:64)
xdfrow3<-(65:96)
xdfrow4<-(97:128)
xdfrow5<-(129:160)
xdfrow6<-(161:192)
2023 Apr 12
1
converting a character matrix into numeric....
Dear Rui,
Not working. I have entirely removed the column containing % but am still bootless:
> head(coredata(INFYTX))
INFY Historical Data INFY Historical Data INFY Historical Data INFY Historical Data
[1,] "47.26" "44.28" "47.56" "44.28"
[2,] "46.30" "44.92"
2009 Jun 19
1
(FULL) Need help to optimize a piece of code involving zoo objects
(Sorry, sent the message before I finished it)
Hello, everyone
I have a long script that uses zoo objects. In this script I used
simple moving averages and these I can very efficiently calculate with
filter() functions.
Now, I have to use special "exponential" moving averages, and the only
way I could write the code was with a for-loop, which makes everything
extremely slow.
I don't
2011 Jun 14
1
Expand DF with all levels of a variable
Dear list,
I would like to expand a DF with all the missing levels of a variable.
a <- c(2,2,3,4,5,6,7,8,9)
a.cut <- cut(a, breaks=c(0,2,6,9,12), right=FALSE )
(x <- data.frame(a, a.cut))
# In 'x' the level "[0,2)" is "missing".
AddMissingLevel <- function(xdf) {
xfac <- factor( c("[0,2)", "[2,6)", "[6,9)",
2009 Jun 19
1
Need help to optimize a piece of code involving zoo objects
Hello, everyone
I have a long script that uses zoo objects. In this script I used
simple moving averages and these I can very efficiently calculate with
filter() functions.
Now, I have to use special "exponential" moving averages, and the only
way I could write the code was with a for-loop, which makes everything
extremely slow.
I don't know how to optimize the code, but I need to
2023 Apr 12
1
converting a character matrix into numeric....
Dear members,
I have an xts object:
> head(INFYTX)
INFY Historical Data INFY Historical Data.1 INFY Historical Data.2
2003-04-16 "47.26" "44.28" "47.56"
2003-04-17 "46.30" "44.92" "46.53"
2003-04-21 "45.82"
2023 Apr 12
1
converting a character matrix into numeric....
?s 19:57 de 12/04/2023, akshay kulkarni escreveu:
> Dear members,
> I have an xts object:
>
>> head(INFYTX)
> INFY Historical Data INFY Historical Data.1 INFY Historical Data.2
> 2003-04-16 "47.26" "44.28" "47.56"
> 2003-04-17 "46.30" "44.92"
2023 Apr 12
1
converting a character matrix into numeric....
Isn't this like trying to tie up the horse after it has left the barn? Why not figure all this out _before_ converting to xts?
On April 12, 2023 12:29:49 PM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote:
>Dear Rui,
> Not working. I have entirely removed the column containing % but am still bootless:
>
>> head(coredata(INFYTX))
> INFY
2011 Sep 27
2
Coercing a character zoo to a numeric
Dear R-helpers,
It seems to me that a character zoo cannot be coerced to a numeric zoo.
Below is a minimal example. Can someone tell me what I have done wrong?
> z<-zoo(1:4,order.by=1:4)
> coredata(z)<-as.character(coredata(z))
> str(z)
‘zoo’ series from 1 to 4
Data: chr [1:4] "1" "2" "3" "4"
Index: int [1:4] 1 2 3 4
>
2009 May 01
5
PyGrub + ZFS: getbootstring. How it works?
I have NexentaCP2 (Opensolaris b104+).
Parameters for the kernel:
''zfs-bootfs=syspool/rootfs-nmu-000,bootpath=/xpvd/xdf@0:a''
Pygrub returns:
''zfs-bootfs=syspool/30,bootpath=/xpvd/xdf@0:a''
Result: Boot with pygrub don''t work.
What is "30" in syspool/30 ?
_______________________________________________
Xen-users mailing list
2007 Mar 31
1
Problem with S4 inheritance: unexpected re-initialization?
Dear all,
To explain my problem I am attaching a demonstration package "myclasspkg":
I have the following two S4 classes with similar inheritance:
SubSubClassA <- SubClassB <- BaseClass
SubSubClassB <- SubClassB <- BaseClass
In R I am calling the following functions:
> library(myclasspkg)
> subA <-
2015 Jan 22
3
need help with renaming a variable
Hello.
I am new to R, so my question/problem might be very basic, but I cannot
figure out how to solve it.
So, I would really appreciate your help.
I would like to rename a variable in a very large file (181GB) called
"2013.xdf" that is saved on my external hard drive.
I tried running the following code to rename variable # 2 in the file and
save this change, which produced some
2011 Apr 30
1
More flexible aggregate / eval
Dear list,
I would like to do some calculation using different grouping variables.
My 'df' looks like this:
# Some data
set.seed(345)
id <- seq(200,400, by=10)
ids <- sample(substr(id,1,1))
group1 <- rep(1:3, each=7)
group2 <- rep(1:2, c(10,11))
group3 <- rep(1:4, c(5,5,5,6))
df <- data.frame(id, ids, group1, group2, group3)
df <- rbind(df, df, df)
df$time <-
2009 Mar 25
2
need help with ordering of plots
I want to do a series of contour plots, 4 in all. The data is coming
from a data frame named "nd.frame", which has elements "xdf", "ydf",
"zdf", and "pndt". I am treating "pndt" as a factor, and it has four
levels. I make a call to the lattice graphics routine "contourplot"
like so:
2012 Sep 14
0
problem with user defined panel function in xyplot
Hi everyone,
?
I am trying to do a horizonplot using my own time series
data. I know that there is a horizonplot function in latticeExtra, but on
closer examination i think that the graph itself is slightly wrong (it displays
some regions as triangles and i think they should be trapezoids, and the red
regions (that are below the baseline) are displayed on top of the blue areas ?
while i think
2006 Nov 29
2
problem with indexing a zoo object
My problem is the following : I create 2 zoo objects and then I try to
subset one of them using logic. indicesthatpass is a vector of trues and
falses but when I send it into bckret, it returns an empty bckret.
Obviously it has something to do with bckret being a zoo object and if I
do the same subsctripting off of coredata(bckret), I'm confident it will
work. But, I need to keep the minute
2006 Nov 23
1
Problem with as.ts(zoo-object)
Dear all,
I have an error message, when I try to convert a zoo object (called
test) to ts (on R 2.4.0, Package zoo version 1.2-1, Windows XP)
> test
1994-05-10 1994-06-09 1994-07-09
0.0024943889 0.0024881824 0.0006955831
> str(test)
atomic [1:3] 0.002494 0.002488 0.000696
- attr(*, "index")=Class 'Date' num [1:3] 8895 8925 8955
> is.regular(test)
[1] TRUE
2008 Oct 22
1
R 2.8.0 qqnorm produces error with object of class zoo?
Dear list-reader,
by running the following script:
library(zoo)
sessionInfo()
search()
packageDescription("zoo")
data(EuStockMarkets)
dax <- as.zoo(EuStockMarkets[1:10, "DAX"])
daxr <- diff(log(dax))
identical(as.vector(qnorm(daxr)), qnorm(coredata(daxr)))
qqnorm(coredata(daxr))
qqnorm(daxr)
qqnorm() produces an error:
> qqnorm(daxr)
Fehler in if (xi == xj) 0L
2011 Apr 19
1
Axes Alignment Problem for Multiple Plots
Dear all,
I'm trying to plot, in the same window, two different series, using barplot() for the first one and plot() for the second. What happens is that the second chart has a different axes origin, therefore the final plot is wrong. This piece of code shows the differences between the values of par()$usr:
barplot(coredata(Z0), beside=TRUE, ylim=c(0,100));
par()$usr;
2007 Mar 16
1
Problems with package containing S4 classes
Dear all,
Currently, I am trying to create a test package "testS4" using S4 classes,
which I am attaching.
Running R CMD check gives the following error:
coeurebooks-computer:/Volumes/CoreData/CRAN cs$ R CMD check
testS4_0.1.1.tar.gz
* checking for working latex ...sh: line 1: latex: command not found
NO
* using log directory '/Volumes/CoreData/CRAN/testS4.Rcheck'
* using R