Displaying 20 results from an estimated 2000 matches similar to: "Problem with example(medpolish) in R-devel"
2008 Jul 15
1
methods/namespaces/possible bug
Using
> methods("plot")
[1] plot.Date* plot.HoltWinters* plot.POSIXct*
[4] plot.POSIXlt* plot.TukeyHSD plot.acf*
[7] plot.data.frame* plot.decomposed.ts* plot.default
[10] plot.dendrogram* plot.density plot.ecdf
[13] plot.factor* plot.formula* plot.hclust*
[16] plot.histogram* plot.isoreg* plot.lm
[19] plot.medpolish*
2018 Jan 19
1
bug fix integer overflow in medpolish function
Dear R team
I noticed a bug in the "medpolish" function in the "stats" package.
When I run medpolish(x), with "x" the matrix in the attached .rda file,
I get this rather cryptic error:
"Error in if (converged) break : missing value where TRUE/FALSE needed
In addition: Warning message:
In sum(abs(z), na.rm = na.rm) : integer overflow - use
2009 Jun 14
1
time function behavior for ts class objects
Hi all-
I am trying to use the time function for ts class objects and do not
understand the return value. I want to use it to set up a time trend in
arima fits. It does not seem to return a correct linear sequence that
matches the underlying time series. I am running:
R version 2.8.1 (2008-12-22).
For example:
R> ## create a time series
R> x <- rnorm(24)
R> (xts <-
2011 Mar 22
1
Find Principal Component Score per year
Hi,
I am trying to calculate Principal Component Scores per id per year using
the psych package. The following lines provide the scores per obeservation
pca = data.frame(read.table(textConnection(" id year A B C D
1001 1972 64 56 14 23
1003 1972 60 55 62 111
1005 1972 57 51 10 47
1007 1972 59 49 7 10
1009 1972 65 50 9 32
1011 1972 52 58 3 5
1013
2011 Nov 19
3
reshape data.frame
A late friday afternoon coding question. I'm having a hard time thinking
of the correct search terms for what I want to do.
If I have a df like this:
a <-
data.frame(name=c(rep('a',10),rep('b',15)),year=c(1971:1980,1971:1985),amount=1:25)
name year amount
1 a 1971 1
2 a 1972 2
3 a 1973 3
4 a 1974 4
5 a 1975 5
6 a 1976
2013 Mar 14
1
ggplot2 problem
Hello all!
I have a problem with ggplot2 library. I want to do an heat map and the y
variables are the year months. If I use the following code, he y values are
in alphabetical order, but I want it in month order.
The code is:
library(reshape)
library(ggplot2)
library(scales)
p <- ggplot(data.m, aes(variable, Month)) + geom_tile(aes(fill = value),
2002 Nov 16
0
Wishlist: allow NA values in medpolish (package 'eda') (PR#2298)
Full_Name: Frederic Schutz
Version: 1.6.1
OS: Linux
Submission from: (NULL) (128.250.252.193)
The subject says everything... This has already been proposed in
June 2001 (cf http://maths.newcastle.edu.au/~rking/R/help/01a/2333.html),
but no reply followed.
I attach the patch that I used on my system to add this feature
(including an updated help page), if it can help. Sorry, the
two
2004 Mar 09
1
vector extraction
Hello,
I could need some help on this one:
>From the data.frame "Test.dataset2" below (TSCS data for 151
"countries.to.map" for "year" 1973-95; each "country.to.map" is described by
a unique code), I would like to extract a vector "color" that for each
"country.to.map" takes on the value of "dv" (a categorical variable with
2017 Jul 05
4
Help with reshape/reshape2 needed
Hi all:
I'm struggling with getting my data re-formatted using functions in
reshape/reshape2 to get from:
1957 0.862500000
1958 0.750000000
1959 0.300000000
1960 0.287500000
1963 0.675000000
1964 0.937500000
1965 0.025000000
1966 0.387500000
1969 0.087500000
1970 0.275000000
1973 0.500000000
1974 0.362500000
1976 0.925000000
1978 0.712500000
1979 0.337500000
1980 0.700000000
1981 0.425000000
2008 Nov 04
1
perform Kruskal-Wallis test without using the built-in command in R
Hi,
again i am stuck in my presentation, and i have never learn R before in my
life but need this to be done, so please help me out for a favour:
http://www.nabble.com/file/p20333155/kew.dat kew.dat
run this in R and these comes up:
Month Year Rain
1 Jan 1900 74.400000
2 Feb 1900 80.500000
3 Mar 1900 23.600000
4 Apr 1900 23.600000
5 May 1900 25.100000
6
2009 Nov 22
1
Metaplot Axis Annotation
Hello,
We are looking to adjust the font size of the axis annotation on the graph
that results from use of the metaplot() function. Metaplot seems to respond
to cex and cex.lab to change those graphical parameters, but it doesn't
respond to cex.axis. Is there a way to work around this by creating a
customized x-axis, and if so, how?
Thanks for all your help. Syntax is below.
Best,
Dawn
2004 Feb 04
5
Newbie question: histogram
Hello,
how do you create a histogram with a data frame?
year snow.cover
1970 6.5
1971 12.0
1972 14.9
1973 10.0
1974 10.7
1975 7.9
...
mydata=data.frame(year=c(1970,...),snow.cover=c(6.5,...))
hist(mydata) does not work.
Many thanks.
PR
2009 Jan 14
1
publication statistics from Web of Science
Dear list,
This is a bit of an off-topic question, but I'm hoping to get some
advice from more experienced people. I've used the website "Web of
Science" to manually collect publication counts responding to several
keywords as a function of date, since the 1960s.
http://apps.isiknowledge.com/RAMore.do?product=UA&search_mode=&SID=P1g9lFJp9 at
2017 Jul 05
0
Help with reshape/reshape2 needed
This does not use reshape/reshape2, but it is pretty straightforward. Assuming X is your example data:
> Y <- split(X[, 2], X[, 1])
> vals <- sapply(Y, length)
> pad <- max(vals) - vals
> Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x])))
> names(Y2) <- names(Y)
> X2 <- do.call(cbind, Y2)
> X2[, 1:6]
1957 1958 1959
2011 Aug 26
1
methods() not listing some S3 plot methods...?
Dear List,
This may be related to this email thread initiated by Ben Bolker last
month: https://stat.ethz.ch/pipermail/r-devel/2011-July/061630.html
In answering this Question on StackOverflow
http://stackoverflow.com/q/7195628/429846 I noticed that `methods()` was
not listing some S3 methods for `plot()` provided by the mgcv package.
At the time I wanted to check the development version of R as
2017 Jul 05
0
Help with reshape/reshape2 needed
The reason it doesn't work easily with reshape/reshape2 is that the
order of the rows is not determined. Your answer could be
1957 1958 ... 1985 1986
0.8625000 0.7500000 ... 0.7307692 0.23750000
0.0733945 0.6435644 ... NA 0.05769231
0.5096154 NA ... NA 0.65137615
or
1957 1958 ... 1985 1986
0.0733945 0.6435644 ... NA
2017 Jul 05
1
Help with reshape/reshape2 needed
Hi Tom,
Or perhaps:
#assume the data frame is named "tadf"
library(prettyR)
stretch_df(tadf,1,2)
Jim
On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn <istazahn at gmail.com> wrote:
> The reason it doesn't work easily with reshape/reshape2 is that the
> order of the rows is not determined. Your answer could be
>
> 1957 1958 ... 1985 1986
>
2011 Dec 12
2
Colours for sunflowerplot
Dear fellow R users,
I would like to draw a "sunflowerplot" because I have data (decade by
month) that plots multiple times on the same x-y co-ordinates. Further I
would like to colour each of the points/sunflower leaves on the plot
according to the group they belong to (i.e. which type of event each
represents within that decade and month). I thought that this would be
relatively
2002 May 31
2
error in seq.POSIXt?
I am trying to extract only the winters (defined to be 01-Dec through
28-Feb) of daily data from 1948-2002. There are 90 days in each winter
season. I wrote the following code to gather the winter dates into a
single vector:
DJF <- NULL
for(year in 1949:1999) {
temp.begin <- strptime(paste("01/12", year-1, sep="/"), "%d/%m/%Y")
temp.end <-
2009 Jan 27
1
Data Frame Manipulation: Time Series
Dear R Helpers:
I have a data set where the unit of observation is country-year. I would like to generate a new data set based on some inclusionary (exclusionary) criteria. Here is an example of the type of data that I have.
df<-data.frame(cbind("country"=c(rep("Angola", 9), rep("Burundi", 7), rep("Chad", 13)), "year"=c(1975:1983, 1989:1995,