Displaying 20 results from an estimated 20000 matches similar to: "how to work with Year-Month dates"
2010 Jul 16
4
how to comment off sections
Hello,
Is there an way to easy comment of sections of code? I was thinking
something along the lines of
\dontrun{
codeline 1
....
codeline k
}
but that could be used in regular script files. When I am still
working on a script, I often want to being using what is done, but I
would like the parts I am still working on not to be run when I use
source() on the file. I can set everything off
2011 Sep 24
3
Supporting R/Membership
Dear R Users,
I know issues like this have come up in the past. I am wondering how
many people would be interested in an online mechanism for donating to
the R Foundation or for becoming supporting members. Right now, the
link for it is somewhat buried on the R home page, and once you get
there, the options are to mail or fax a form. IIRC, Paypal was not a
good option due to some fees, but
2011 Oct 12
3
trace an Rd conversion error in R cmd check
Hi All,
Apologies if this is a very naive question. Is there a way to see the
particular Rd file being processed right before a warning/error
occurs? As far as I can tell, all my .Rd files use have names and
titles and they are unique between Rd files (sometimes in a file I use
something like \name{foo} \title{Foo}). I seem to be able to convert
files to latex using: R CMD Rdconv --type=latex
2014 Aug 07
2
How to (appropropriately) use require in a package?
Dear All,
What is the preferred way for Package A, to initialize a cluster, and load
Package B on all nodes?
I am writing a package that parallelizes some functions through the use of
a cluster if useRs are on a Windows machine (using parLapply and family).
I also make use of another package in some of my code, so it is necessary
to load the required packages on each slave once the cluster is
2010 Jan 14
5
Better way than an ifelse statement?
Hello All,
I am trying to create a column of weights based off of factor levels
from another column. I am using the weights to calculate L scores.
Here is an example where the first column are scores, the second is my
"factor" and the third I want to be a column of weights. I can do
what I want with an ifelse statement (see below), but I am wondering
if anyone knows of a cleaner way
2011 Apr 05
1
Antw: Re: Confidence interval for the difference between proportions - method used in prop.test()
Dear Josh,
Thanks for your help!
Does your answer mean, that you agree the two methods should do the same, and what I was guessing, despite the small differences?
What I prefer about ci.pd is, that the help clearly says which method is implemented, which is not the case for prop.test. But I do not know who has programmed the function.
Best wishes
Steffi
Stefanie von Felten, PhD
Statistician
2010 Nov 20
10
An empty grey diagram
Hi folks,
Win7 64bit
R 1.12.0
I run following command on R:-
> ToothGrowth
> attach(ToothGrowth)
> plot(dose,len)
> matrics=lm(len~dose)
> abline(metrics)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
plot.new has not been called yet
Only a grey diagram is displayed without content
> plot(abline(metrics))
Error in int_abline(a = a, b = b, h = h, v
2010 Nov 02
5
Question about ggplot2
Dear All,
I am trying to graph a simple scatter plot where the x axis is year
and the y axis is a percentage (percentage of infant death). Instead
of plotting the raw data, I want to plot summary statistics such as
mean and median. Here is the problem: the value range of y is between
0 and 1, but since infant death is a rare event, the mean and median
is very low (something like 5%), which shows
2010 Oct 08
5
saving object function
Ok so if I have a function:
functest<-function(x){
a<-x+1
b<-x+2
c<-x+3
paste(a)
paste(b)
paste(c)
}
Now I know I can do cat(), or return() on one of them but if I was to run
the function with any number, how could I create objects to save so I could
do, I am wondering if I have more than one object within my function.
functest$a
2010 Oct 11
1
Is there a regression surface demo?
Hi All,
Does anyone know of a function to plot a regression surface for two
predictors? RSiteSearch()s and findFn()s have not turned up what I
was looking for. I was thinking something along the lines of:
http://mallit.fr.umn.edu/fr5218/reg_refresh/images/fig9.gif
I like the rgl package because showing it from different angles is
nice for demonstrations. I started to write my own, but it has
2011 Mar 13
4
readMat - how to retrieve the variables
Hello
I have a matlab MAT file that contains one single variable: a. The
structure of a is as follows:
a.river1.flow (flow values)
a.river1.date_flow (date)
a.river1.precip (precipitation values)
a.river1.date_precip
a.river2.flow
a.river2.date_flow
a.river2.precip
a.river2.date_precip
I have used readMat to load the variable a in R, however I have no idea how
readMat translates a. I managed
2010 Mar 12
2
Return one value, print another
Dear R users,
I am stuck trying to figure out how to make a function return one
value and print another.? Here is an example function:
##################
eg <- function(x, digits=4) {
xbar <- mean(x)
sdx <- sd(x)
value <- list(xbar, sdx)
names(value) <- c("Mean of X", "SD of X")
return(value)}
##################
My current "solution" has been to
2010 Dec 14
1
tcltk error compiling R 2.13.0 under Windows 7 x64
Hi All,
I am trying to compile R 2.13.0 r53834 on 64-bit Windows 7 (home
premium) using Rtools212.exe from Duncan Murdoch's site. I (think) I
followed the installation guide for Windows. When installing Rtools,
made sure I was installing 64-bit tools (including tcltk), etc. I
created a copy of MkRules.local where I selected 64 bit instead of 32
architecture. When I run:
2011 May 28
2
reduce printing accuracy
Dear all,
I would like to print a few values with less digits than the default.
How I can reduce how many digits are printed ?(warning: not the real integer resolution but what is shown in screen)
Best Regards
Alex
2010 Jun 02
8
bind select data frames
Dear group,
Here is my environment:
> ls()
[1] "DailyPL100419" "DailyPL100420" "DailyPL100421" "dd" "i"
"l" "PLglobal" "Pos100416" "Pos100419" "Pos100420"
"Pos100421" "position"
[13] "result" "sel"
2011 Jun 21
5
omitting columns from a data frame
Dear R People:
I have a data frame, xm1, which has 12 rows and 4 columns.
If I put is xm1[,-4], I get all rows, and columns 1 - 3, which is as
it should be.
Now, is there a way to use the names of the columns to omit them, please?
Thanks so much in advance!
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
2012 Mar 13
2
sort list
Hello can anyone help please?
i read two words "cell1", "cell2" into a list. I want to turn this list
into a factor.
> cell_data <-list(c('cell1','cell2'))
> cell_data
[[1]]
[1] "cell1" "cell2"
> factor_list <- factor(cell_data)
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called
2011 Jul 16
4
Z-test
Hi,
please could you recommend a R package that computes a 2 sample z-test ?
thanks,
Bogdan
[[alternative HTML version deleted]]
2010 Oct 07
6
Deleting observations - can't see the data after that
Hello all,
I am loading a data frame, fitting a model, getting diagnostic plots and they are flagging a couple of observations as problematic. Fair enough, and I want re-fit without them.
After I delete an offending row (identified by one of the diagnostic plots), something like
data = data[-3,];
then R will no longer print the contents of the data frame; it tells me it is a data frame
2010 Aug 04
2
by group testing
Hello,
I have a data set which is similar to the following data
mice <- rep(letters[1:4],10)
outcome <- sample(c(0,1),length(mice),replace=T)
group <- c(rep("A",length(mice)/2),rep("B",length(mice)/2))
my.data <- data.frame(mice,outcome,group)
my.sort.data <- my.data[order(my.data[,1]),]
I would like to test wether there is a different between group A and B