Displaying 20 results from an estimated 63 matches for "romocea".
2005 Jan 11
5
global objects not overwritten within function
Dear useRs,
I have a function that creates several global objects with
assign("obj",obj,.GlobalEnv), and which I need to run iteratively in
another function. The code is similar to
f <- function(...) {
assign("obj",obj,.GlobalEnv)
}
fct <- function(...) {
for (i in 1:1000)
{
...
f(...)
...obj...
rm(obj) #code fails without this line
}
}
I don't understand
2005 Apr 06
3
looking for a plot function
Dear useRs,
I have a data frame and I want to plot all rows. Each row is
represented as a line that links the values in each column. The plot
looks like this:
dfr <- data.frame(A=sample(1:50,10),B=sample(1:50,10),
C=sample(1:50,10),D=sample(1:50,10))
xa <- 10*1:4
plot(c(10,40),c(0,50))
for (i in 1:nrow(dfr)) {
lines(xa,dfr[i,],pch=20,type="o")
}
Things get more complicated
2004 Dec 23
3
combination of scatterplot and image graph
Dear R users,
I'm interested in a combination of a scatterplot and an image graph.
I have two large vectors. Because in the scatterplot some areas are
sparsely and others densely populated, I want to see the points, and
I also want their color to be changed based on their density (similar
to a heat map). Is there a function that can do that?
Thank you,
b.
2004 Oct 11
5
read "4-jan-02" as date
Dear R users,
I have a column with dates (character) in a data frame:
12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01
and I need to convert them to (Julian) dates so that I can
sort the whole data frame by date. I thought it would be
very simple, but after checking the documentation and the
list I still don't have something that works.
1. as.Date returns the error below. What am I
2004 Oct 13
4
incomplete function output
Dear R users,
I have a function (below) which encompasses several tests.
However, when I run it, only the output of the last test is
displayed. How can I ensure that the function root(var)
will run and display the output from all tests, and not
just the last one?
Thank you,
b.
root <- function(var)
{
#---Phillips-Perron
PP.test(var, lshort = TRUE)
PP.test(var, lshort = FALSE)
2007 Dec 27
1
A function for random test based on longest run (UNCLASSI FIED)
...not based on a longest length
of runs of same events. To be more specific, for example, from a series,
HHTHTTTTHHH, the number of runs are 5, and the longest length of runs of the
same events is 4. I'll check for the website you mentioned below.
Kyong
-----Original Message-----
From: bogdan romocea [mailto:br44114@gmail.com]
Sent: Thursday, December 27, 2007 12:08 PM
To: kyong.ho.park@us.army.mil
Cc: r-help
Subject: RE: [R] A function for random test based on longest run
(UNCLASSIFIED)
> require(tseries)
> ?runs.test
Also, take a look at dieharder, it implements a large number of...
2004 Nov 13
3
density estimation: compute sum(value * probability) for given distribution
Dear R users,
This is a KDE beginner's question.
I have this distribution:
> length(cap)
[1] 200
> summary(cap)
Min. 1st Qu. Median Mean 3rd Qu. Max.
459.9 802.3 991.6 1066.0 1242.0 2382.0
I need to compute the sum of the values times their probability of
occurence.
The graph is fine,
den <- density(cap, from=min(cap),
to=max(cap), give.Rkern=F)
2005 Mar 18
6
Basic questions about RMySQL
Hello,
Please forget me if I am asking something that is well documented. I have read documentation but there are points that are not clear for me. I am not expert in R nor Databases, but if someone direct me to a tutorial, I will appreciate it..
1. In my understanding, I can install and use RMySQL withouth having to install MySQL in my PC, to have access to and to create new tables . Is this
2005 Oct 07
1
The R Graph Gallery {was boxplot statistics}
...at saic.com ` \
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]
Sent: Friday, October 07, 2005 3:22 AM
To: francoisromain at free.fr
Cc: R-help at stat.math.ethz.ch; karin.lagesen at medisin.uio.no; bogdan romocea
Subject: [R] The R Graph Gallery {was boxplot statistics}
>>>>> "Romain" == Romain Francois <francoisromain at free.fr>
>>>>> on Thu, 06 Oct 2005 23:23:12 +0200 writes:
Romain> Selon bogdan romocea <br44114 at gmail.com>:
>>...
2005 Jun 20
2
how to make R faster under GNU/Linux
Dear useRs,
I timed the same code (simulation with for loops) on the same box
(dual Xeon EM64T, 1.5 Gb RAM) under 3 OSs and was surprised by the
results:
Windows XP Pro (32-bit): Time difference of 5.966667 mins
64-bit GNU/Linux (Fedora Core 4): Time difference of 6.966667 mins
32-bit GNU/Linux (FC4): Time difference of 9.2 mins
(R 2.1.0 binaries downloaded from CRAN)
I searched the
2005 Feb 10
3
question about sorting POSIXt vector
Dear useRs,
How come the first attempt to sort a POSIXt vector fails (Error:
non-atomic type in greater), while the second succeeds? (Code inserted
below.) The documentation says that POSIXt is used to allow operations
such as subtraction, so I'd expect sorting to work. Is this perhaps an
OS issue? (I run R 2.0.1 on Win xp.)
Thank you,
b.
#------------code
test <- c("2005-02-08
2004 Dec 12
2
errors when trying to rename data frame columns
Dear R users,
I need to rename the columns of a series of data frames. The names of
the data frames and those of the columns need to be pulled from some
vectors. I tried a couple of things but only got errors. What am I
missing?
#---create data frame
dframes <- c("a","b","c")
assign(dframes[2],data.frame(11:20,21:30))
#---rename the columns
cols <-
2004 Nov 08
3
misleading output after ordering data frame
Dear R users,
I have a data frame which I create with read.csv and then order by
date:
d <- na.omit(read.csv(...))
d <- d[order(as.Date(as.character(d$Date), format="%d-%b-%y"),
decreasing=F, na.last=F),]
My problem is that even though the data frame is ordered as
requested, the old row numbers are preserved. For example:
* Before sorting:
> d[1:3,]
Date Amt
1
2006 Jan 09
0
need palette of topographic colors similar to topo.colors ()
...for generating palettes
* rgb and hsv creates palette from RGB or HSV 3-vectors.
Maybe one of those will work for you.
Jarek
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]
Sent: Saturday, January 07, 2006 3:10 PM
To: bogdan romocea
Cc: r-help
Subject: Re: [R] need palette of topographic colors similar to topo.colors()
On Sat, 7 Jan 2006, bogdan romocea wrote:
> Dear useRs,
>
> I got stuck trying to generate a palette of topographic colors that
> would satisfy these two requirements:
> - the pallete must b...
2005 Mar 31
2
how to simulate a time series
Dear useRs,
I want to simulate a time series (stationary; the distribution of
values is skewed to the right; quite a few ARMA absolute standardized
residuals above 2 - about 8% of them). Is this the right way to do it?
#--------------------------------
load("rdtb") #the time series
> summary(rdtb)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-1.11800 -0.65010 -0.09091
2004 Dec 30
2
coplot with png: disappearing grid lines
Dear useRs,
When I use coplot() and output to png/jpeg/bmp, the grid lines from
the scatter plots disappear. If I output to pdf() the grid lines are
there, however I can't use it - I have many points, and the resulting
PDF file is large and very slow to open and scroll through. (By the
way, if I click File-Save As-png/jpeg/bmp from Rgui.exe, the grid
lines are preserved - but I need to use
2005 Jun 08
2
get level combinations from "by" list
Dear useRs,
Given this code I end up with a list of class "by":
a <- sample(1:5,200,replace=TRUE)
b <- sample(c("v1","v2","v3"),200,replace=TRUE)
c <- sample(c(11,22,33),200,replace=TRUE)
data <- runif(200)
grouped <- by(data,list(a,b,c),function(x) {c(min=min(x),max=max(x),
median=round(median(x),digits=2),mean=round(mean(x),digits=2))})
2004 Oct 15
2
combine many .csv files into a single file/data frame
Dear R users,
I have a few hundred .csv files which I need to put
together (full outer joins on a common variable) to do a
factor analysis. Each file may contain anywhere from a few
hundred to a few thousand rows. What would be the most
efficient way to do this in R? Please include some sample
code if applicable.
Thank you,
b.
2007 Jan 04
3
export many plots to one file
Dear useRs,
I have a few hundred plots that I'd like to export to one document.
pdf() isn't an option, because the file created is prohibitively huge
(due to scatter plots with many points). So I have to use png()
instead, but then I end up with a lot of files (would prefer just
one).
1. Is there a way to have pdf() embed images, instead of vector
instructions? (What would have to be
2005 Jul 14
3
read.xport
I am trying to import data from a SAS XPORT file that contains 24 SAS files.
When I use the "read.xport" procedure only about 16 data frames (components)
are created. Any suggestions?
*************************************************************************
Gary A. Nelson, Ph.D
Massachusetts Division of Marine Fisheries
30 Emerson Avenue
Gloucester, MA 01930
Phone: (978)