jim holtman wrote:
just use timeDate from Rmetrics, there you will find several functions
like ...
# timeLastDayInMonthComputes the last day in a given month and year
# timeFirstDayInMonth Computes the first day in a given month and
year
# timeLastDayInQuarter Computes t
Dear R-helpers,
I have a number of dataframes that looks something like this:
mydfr <- data.frame(treatment=c(rep("A",3),rep("B",3)), Xmeas=1:6,
Ymeas=c(2,4,3,3,5,6))
# except with many more variables, which I plot all the time colored
by treatment to quickly check things:
with(mydfr, plot(Xmeas
Karen
You can copy and paste data directly into R from Excel:
1. Mark the data including the headings in Excel
2. Ctrl-C
3. In R:
myDF <- read.delim("clipboard")
Following from Milton:
hist(myDF$VARNAME)
or
hist(myD[,1]) #to plot 1st collumn
hist(myD[,2]) #to plot 2nd collumn
Schalk Heunis
On M
On Mon, Sep 14, 2009 at 5:19 AM, Schalk Heunis
wrote:
> Chris
> try this (assume your dataset is in a dataframe called ms):
> library(lattice)
> xyplot(Value~Time|Name,data = ms)
>
> HTH
> Schalk
>
>
>
> On Mon, Sep 14, 2009 at 2:19 AM, Chris Li wrote:
>
>>
>> Hi all,
>>
>> I am new to R and I hav
Dear all,
I have 10 studies. I want to fit a generalized additive model for each of 8
studies. For combining the results from 10 studies, I have to specify the
same knots (30,40,50,60,70,80,90) and knots boundary, 20 and 100, in
gam(mgcv). Now I just found knots= option in the gam function, so I a
Chris Li wrote:
>
> Hi all,
>
> I am new to R and I have got a question in regards to factors.
>
> Say I have a simple dataset like the following:
>
> Name Time Value
> a 1:00 1.25
> a 2:00 1.26
> b 1:00 1.29
> b 2:00 1.28
> c 1:0
On 14/09/2009, at 2:34 PM, Jack Tanner wrote:
Apologies for the noob question. I need to split setting up a plot
and drawing
it into two functions. One determines the properties of a plot
(data, axis,
labels, etc.), and the other plots it (using a preferred device, image
dimensions, etc.).
Apologies for the noob question. I need to split setting up a plot and drawing
it into two functions. One determines the properties of a plot (data, axis,
labels, etc.), and the other plots it (using a preferred device, image
dimensions, etc.).
get.props = function() {
list(x=x, y=y, xlab="foo",
Hi all,
I am new to R and I have got a question in regards to factors.
Say I have a simple dataset like the following:
Name Time Value
a 1:00 1.25
a 2:00 1.26
b 1:00 1.29
b 2:00 1.28
c 1:00 1.21
c 1:30 1.20
c
On Sep 13, 2009, at 6:54 PM, (Ted Harding) wrote:
Greetings all!
I'm wanting to plot contours of a function, and I don't
want to evaluate it at a dense grid of points (i.e. I don't
want a huge array of values).
Say I have a vector of x-values such as x <- 0.1*c(1:10),
and the same for y <- 0.1
Hi,
On Fri, Sep 11, 2009 at 8:12 PM, Jason Rupert wrote:
> I would like to have a way to automatically change the line color and line
> style.
For auto-generating colors, try ?rainbow
Not sure about what you can do about alternating the line style ...
-steve
--
Steve Lianoglou
Graduate Stud
Hi Karen,
As you are just starting (I guess), I suggest you take a shortcut:
1. copy and paste the data from Excel to the notepad, and
save it as .TXT
2. If all is ok, you will have a tab-delimited file.
3. Be sure that your variables have its names on first line
4. read your data using
setwd("c:
Noah Silverman smartmediacorp.com> writes:
>
> Hi,
>
> Our discussions about 64 bit R has led me to another thought.
>
> I have a nice dual core 3.0 chip inside my Linux Box (Running Fedora 11.)
>
> Is there a version of R that would take advantage of BOTH cores??
> (Watching my system perfo
CRAN (and crantastic) updates this week
New packages
* ant (0.0-6)
Romain Francois
http://crantastic.org/packages/ant
Version of the ant apache build tool, with a few R specific tasks to
ease use of ant within an R package
* caroline (0.1-1)
David M. Schruth
http://cran
How would I make a histogram using R from a table in excel that has 4
variables, but I only want to use 2 of the columns to make the histogram?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailm
Have you looked at lowess? That is the function that Harrell's
perimeter function calls for that purpose.
--
David
On Sep 13, 2009, at 6:54 PM, (Ted Harding) wrote:
Greetings all!
I'm wanting to plot contours of a function, and I don't
want to evaluate it at a dense grid of points (i.e. I don
Greetings all!
I'm wanting to plot contours of a function, and I don't
want to evaluate it at a dense grid of points (i.e. I don't
want a huge array of values).
Say I have a vector of x-values such as x <- 0.1*c(1:10),
and the same for y <- 0.1*(0:10).
I then evaluate a 10*10 matrix z of values o
par(xpd=T)
bp<- barplot(matrix(1:50,5,10),names=F)
text(bp,-2,c('these labels','are tooo','looong'),pos=2,srt=45)
Xiaogang Yang wrote:
>
> Hi, everyone:
> I am plotting an graph with bar plot, but the label after every bar is too
> long, I wanna if I can draw the label lean to an angle
> t
Thanks everyone for all of the help.
--
View this message in context:
http://www.nabble.com/Brand-new-To-R-tp25424799p25426303.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/m
Carrie Li wrote:
>
> Dear r-help group,
>
> I am creating a package that has some FORTRAN code under windows. I have
> read through "Writing R Extension" but still not so clear about the steps.
>
> Before R CMD build, how can I create a dynamic library and later in my R
> function using dyn
On 13-Sep-09 16:47:07, czarjosh wrote:
>
> I am trying to learn R right now. I came from minitab and wanted
> to learn something a bit more robust. I am trying to figure out
> some simple probability to measures but I do not know the commands.
> I am using > OSX. Are there resources for figuring o
czarjosh wrote:
>
> I am trying to learn R right now. I came from minitab and wanted to
> learn something a bit more robust. I am trying to figure out some simple
> probability to measures but I do not know the commands. I am using OSX.
> Are there resources for figuring out simple events
That should have been yearmon (not yearqtr):
> library(zoo) # as.yearqtr
>
> # test data
> x <- c("sep2009", "oct2009")
>
> # convert to "yearmon" class and from that to Date using frac = 1
> # where frac is between 0 and 1 inclusive indicating where
> # in the month the output date should be set
Try this:
> library(zoo) # as.yearqtr
>
> # test data
> x <- c("sep2009", "oct2009")
>
> # convert to "yearqtr" class and from that to Date using frac = 1
> # where frac is between 0 and 1 inclusive indicating where
> # in the month the output date should be set to
>
> as.Date(as.yearqtr(x, "%b%Y"
On Sep 13, 2009, at 12:47 PM, czarjosh wrote:
I am trying to learn R right now. I came from minitab and wanted
to learn
something a bit more robust. I am trying to figure out some simple
probability to measures but I do not know the commands. I am using
OSX.
Are there resources for
Does this help. Shows how to use the basic functions to get at the answer:
> # add first day of month to make it valid
> x <- as.POSIXct(paste('1', 'sep2009', sep=''), format="%d%b%Y")
> # now advance one month and then go back one day for the end of the month
> next.mon <- seq(x, length=2, by='1
Is there any R function to calculate automatically the last day of a
particular month? For example "sep2009" should be converted to last day of
September of 2009?
Thanks
--
View this message in context:
http://www.nabble.com/How-to-get-last-day-of-a-month--tp25425645p25425645.html
Sent from the
If by chance you have an objective function you could automatically
calculate the optimum number of nearest neighbors by cross validation
eliminating the need to set it in the first place.
On Sun, Sep 13, 2009 at 10:19 AM, Bryan wrote:
> Is this option (number of nearest neighbors) translate-able
I am trying to learn R right now. I came from minitab and wanted to learn
something a bit more robust. I am trying to figure out some simple
probability to measures but I do not know the commands. I am using OSX.
Are there resources for figuring out simple events?
If I have data distributed
Hi David,
Thanks. This has really helped me clarify my needs and the results
are now far closer to what I need. I've dropped stuff I didn't really
need to keep out of the data array and clarified the subset equation.
The one place where I still need some help is in the automatic
creation of
On Sep 13, 2009, at 1:19 PM, Tal Galili wrote:
Hello dear r-help group
I am turning for you for help with FAQ number 7.31: "Why doesn't R
think
these numbers are equal?"
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
*My story* is this:
I
Dear r-help group,
I am creating a package that has some FORTRAN code under windows. I have
read through "Writing R Extension" but still not so clear about the steps.
Before R CMD build, how can I create a dynamic library and later in my R
function using dyn.load ("xxx.dll") ?
If I already have
Hello dear r-help group
I am turning for you for help with FAQ number 7.31: "Why doesn't R think
these numbers are equal?"
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
*My story* is this:
I wish to run many lm predictions and need to have them
Hello dear R-help members.
I need to run many "predict.lm" routines, and was hoping to have it run
faster then it does now.
One way I was thinking about was to have it run on a matrix instead on a
data.frame (since in my situation a matrix will suffice).
Can someone suggest to me of ways to have
Try this:
apply(subset.models[,-1], 1,
function(x)lm(as.formula(paste('y ~', paste(names(freeny[,-1])[x],
collapse = "+"), sep = "")), data = freeny))
On Sun, Sep 13, 2009 at 10:57 AM, Axel Urbiz wrote:
> Hi,
>
> Id like to fit one GLM model for each possible combination of inputs (i.
Is this option (number of nearest neighbors) translate-able into bandwidth?
In reading the kknn article, it seems like it might be but I'm still not
exactly sure how. Unfortunately this is an important issue as the end users
are used to using certain bandwidth values for their work.
It may be more
On Fri, Sep 11, 2009 at 7:15 PM, carol white wrote:
> It might be a primitive question but how it is possible to determine if a
> variable is initialized in an environment?
What about this?
> "x" %in% ls()
[1] FALSE
> x = 41
> "x" %in% ls()
[1] TRUE
Best,
Michael
--
Michael Knudsen
micknud.
Hi,
Id like to fit one GLM model for each possible combination of inputs (i.e.
exhaustive search). The package leaps can help me to generate all possible
variable subsets, but Ill appreciate your guidance as of how to generate
one model for each of those possible subsets. Im new in R! Thanks i
months<-c("jan","feb","mar","apr","may","jun",
"jul","aug","sep","oct","nov","dec")
sortorder<-order(as.numeric(date2[,2]),match(date2[,1],months))
date2[sortorder,]
is probably what you want.
megh wrote:
> I have following object :
>
>> date2
>[,1] [,2]
> [1,] "ap
Many thanks,
truly a simple and elegant solution!
Caroline
On Sun, Sep 13, 2009 at 12:08 AM, David Winsemius
wrote:
>
> On Sep 12, 2009, at 11:36 AM, caroline choong wrote:
>
>> Dear all,
>> I have a data set as follows:
>>
>> ID cycle.number cycle.result
>> 1 2525
On Fri, Sep 11, 2009 at 10:05 PM, Noah Silverman
wrote:
> Is there a version of R that would take advantage of BOTH cores??
Well, if your job is parallelizable, it's actually fairly easy. When I
discovered the package 'foreach', I wrote the following piece
completely overwhelmed by enthusiasm:
I have created stability plot for Vector Auto Regressive model. But, how can I
find the boundary for stability plot? Thanks in advance
_
[[alternative HTML version deleted]]
__
R
Many thanks,
the solution is simple and elegant, as usual ;). R is a great tool, the
best I know, unfortunately I need more time to practice ...
regards
Tomas
On Sat, 2009-09-12 at 22:52 -0400, Gabor Grothendieck wrote:
> Try this:
>
> library(zoo)
> x <- zoo(rnorm(1:6000), as.Date("1992-11-11"
Thanks Tal. I modified my code based on your suggestion (below). It would be
nice to see other solutions also.
data ##
sam1 <- c(51.7, 54.2, 53.3, 57, 56.4, 61.5, 57.2, 56.2, 58.4, 55.8)
sam2 <- c(62.5, 65.2, 67.6, 69.9, 69.4, 70.1, 67.8, 67, 68.5, 62.4)
DF <- stack(data.frame(sam1 = sam1,
Hi
Can anybody tell me in which library Performance and Prediction routines exist
to find AUC and I am unable to find a dependency of rattle library, XML, for
Windows can any body tell me about that.
Thanks
[[alternative HTML version deleted]]
___
45 matches
Mail list logo