Displaying 20 results from an estimated 5000 matches similar to: "How to get a list work in RData file"
2005 Aug 15
2
queer data set
I have a dataset that is basically structureless. Its dimension varies
from row to row and sep(s) are a mixture of tab and semi colon (;) and
example is
HEADER1 HEADER2 HEADER3 HEADER3
A1 B1 C1 X11;X12;X13
A2 B2 C2 X21;X22;X23;X24;X25
A3 B3 C3
A4 B4 C4 X41;X42;X43
A5 B5 C5 X51
etc., say. Note that a blank
2005 Dec 30
4
Count or summary data
Dear all,
I want to summary and count my data something like
> te.Ce
[,1] [,2]
[1,] -1 0.05
[2,] 1 0.05
[3,] 1 0.00
[4,] 0 0.05
[5,] -1 0.00
[6,] 0 0.10
[7,] 1 0.10
[8,] -1 0.00
[9,] -1 0.10
[10,] 0 0.05
[11,] 0 0.10
[12,] -1 0.10
[13,] 1 0.00
[14,] -1 0.05
[15,] 1 0.00
How could I count (summary) all my data which I need the result like
2005 Mar 21
5
Read a dataset with different lengths
Dear useR again,
How can I read a dataset if lines in dataset did not have same
elements (have different lengths), For example:
1 2, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1
2 2, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1
3 4, 5, 11, 1, 1, 6, 1, 1, 5, 14, 1, 1, 15, 1, 1
4 2, 5, 9, 1, 1, 14, 1, 1, 8, 16, 1, 1, 13, 1, 1
5 3, 7, 14, 1,
2005 Mar 21
1
Convert numeric to class
Dear all,
I have a script about iteration classification, like this below
data(iris)
N <- 5
ir.tr.iter <- vector('list',N)
ir.tr <- vector('list',N)
for (j in 1:N) {
ir.tr[[j]] <- rpart(Species ~., data=iris)
ir.tr.iter[j] <- ir.tr[[j]]$frame
result <- list(ir.tr=ir.tr, ir.tr.iter=ir.tr.iter)
}
as.data.frame(as.matrix(ir.tr.iter))
2010 Aug 21
1
How to find residual in predict ARIMA
Dear All,
I have a model to predict time series data for example:
data(LakeHuron)
Lake.fit <- arima(LakeHuron,order=c(1,0,1))
then the function predict() can be used for predicting future data
with the model:
LakeH.pred <- predict(Lake.fit,n.ahead=5)
I can see the result LakeH.pred$pred and LakeH.pred$se but I did not
see residual in predict function.
If I have a model:
[\
Z_t =
2004 Sep 27
1
random discrete from the first tuple
Dear UseR
I have a dataset, for instance x1(A, B, C), x2(M,F), x3(X1,X2,X3,X4)
and x4(W,F,P). I want to make a small dataset with the random tuple. I
know package e1071 can handle a random discrete,
> library(e1071)
> x1 <- rdiscrete(6, c(2,2,2), c("A","B","C"))
> x2 <- rdiscrete(6, c(3,3), c("M","F"))
> x3 <-
2009 Apr 16
2
Count data with several numbers separated by commas
Dear all,
I have a data file with 3 variables (x1, x2, x3) where variable x1
have data that consists of several numbers separated by commas.
id name x1 x2 x3
aa101 1,4,5 2 1
aa102 1,2,5 1 2
aa103 1,2,5 1 1
aa104 1,2,3 1 2
aa105 1,5 2 2
aa106 1,2,5 2 2
aa107 1,2,5 2 1
aa108 1,4,5 2 1
aa109 1,2 1 2
aa110 3,5 1 2
I want to count the number of data for each
2004 Oct 18
2
why package gregmisc did not work
Dear useR
I want to know why package gregmisc did not work very
well. I did not find this package in my library
directory.
> local({a <- CRAN.packages()
+ install.packages(select.list(a[,1],,TRUE),
.libPaths()[1], available=a, dependencies=TRUE)})
trying URL
`http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length
21630 bytes
2002 May 24
5
intersecting polygons and conversion from decimal degree to km
Dear all,
1. How can I compute the intersecting area between 2 polygons ?
2. I have polygons with coordinates in decimal degrees (i.e. 13 deg 30
min = 13.5 decimal degrees). I want to compute their area and get the
results in square meters or square kiometers. Can anyone give me a
conversion coefficient or a pointer where I can find this information
(sorry for this off topic question) ?
Thanks
2007 Apr 04
5
how to image.plot a XY grid file into a lat-lon map
Hi All,
I have a netcdf gridded file with LCC projection. I can easily use
image.plot to visualize it. However, as the axises are in X,Y, not Lat and
Lon, I could not add state or country maps onto it (or lat lon information).
I do have a grid2d file that describes the lat and lon for each (X,Y) grid,
but the lat and lon are not regularly spaced, so I could not use image.plot.
Does anyone know
2005 Mar 15
0
Packages for multi-class classification with boosting
Are there any packages to handle multi-class classification with boosting.
I know adaboost function include in package "boost" but that is only
for two-class.
Thanks for your help.
Xiyan Lon
2009 Oct 28
2
Re ading and Creating Shape Files
Hello R Community,
I have imported a dataset which contain X Y coordinates and would like to
recreate a shape file after some data analysis. What i have done is to
import some taxlot data and join them based on some criteria. I want to
check to see how well the joining went by reviewing the results in GIS.
A couple things. I cant seem to import a shape file correctly using the
maptools
2011 Jul 01
0
How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
Dear R users,
subject: How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
or subject as: How to filter XY pairs of inacurate gps position: (latitude, longtitude)
to get estimated correct position before calculating track
i.e.
How to estimate (time series? )?
How to filter XY pairs of
2012 Nov 17
3
transform input argument (matrix) of function
Dear list!
I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additional matrixes. Here is an example:
fun1 <- function(xy) {
xy <- cbind(xy[,1], xy[,2], xy[,1] + xy[,2])
return(xy)
}
df1 <- matrix(c(1,2,3,1,2,3), ncol =
2012 Jun 04
1
Plotting with Rgraphviz
Hi All,
After a lengthy battle just to get the package installed, I am not able to
actually use Rgraphviz to generate any plots. I tried just using the sample
code in the documentation
(http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/rgraphviz/)
and I get the following:
*> > library(Rgraphviz)
> test.matrix<-matrix(rep(c(0,1,0,0), 9), ncol=6, nrow=6)
>
2009 Jun 09
3
Splicing factors without losing levels
Hi list!
An operation that I often need is splicing two vectors:
> splice(1:3, 4:6)
[1] 1 4 2 5 3 6
For numeric vectors I use this hack:
splice <- function(x, y) {
xy <- cbind(x, y)
xy <- t(xy)
dim(xy) <- length(x) * 2
return(xy)
}
So far, so good (?). But I also need splicing for factors and I tried
this:
splice <- function(x, y) {
xy <-
1999 Jul 14
2
Weird behavior with names()
Dear R fellows,
Is the following a feature or a bug of names() ??
It does not seem to be reported as a bug in the R Bug Tracking System.
(RedHat 6.0, R-0.64.2 compiled from source, not RPM).
# a trivial test
x <- 1:5
y <- 6:10
names(x) <- c("a", "b", "c", "d", "e")
names(y) <- c("a", "b", "c",
2012 Dec 29
1
bug in plot.ts?
Dear all,
I think I have found a buglet in plot.ts
plot.ts(x=1,type="n") # correct: does not show the plot
plot.ts(x=1,y=1,type="n") # not correct: does show the plot
I did not investigate the problem in depth but it could be related to
the switch xy.labels, in fact
plot.ts(x=1,y=1,type="n",xy.labels=TRUE) # does show the plot
2010 Feb 09
3
split strings in a vector and convert it to a data.frame
hi,
I have a vector full of strings like;
xy_100_ab xy_101_ab xy_102_ab xy_103_ab
I want to seperate each string in three pieces and the separator should be the "_"
at the end I want a data.frame like:
column1 column2 column3
xy 100 ab
xy 101 ab
xy 102 ab
xy 103 ab
I tried strsplit but I couldn't figure out how to convert the list I get into a data.frame.
I just
2014 Mar 21
1
Memcheck: error in a switch using getGraphicsEvent
Hi the list,
One of my package has an (other) error detected by memtest that I do not manage to understand.
Here is the message that I get from Memtest
--- 8< ----------------
> try(choice(cld1))
Error in switch(EXPR = choix, Up = { : EXPR must be a length 1 vector
--- 8< ----------------
The choice function does call the choiceChangeParam function, which is:
--- 8<