Displaying 20 results from an estimated 3000 matches similar to: "Counter"
2009 Apr 28
8
duplicate 'row.names' are not allowed
Hi everyone,
I have got the following problem:
x1 <- rnorm(10,5,1)
x2 <- runif(10,0,1)
nam1 <- paste("A",1:4,sep=".")
nam2 <- paste("A",6:9,sep=".")
nam <- c(nam1,"A.4",nam2,"A.9")
mydata <- data.frame(x1,x2)
rownames(mydata) <- nam
Error in `row.names<-.data.frame`(`*tmp*`, value = c("A.1",
2009 Jun 08
5
mean
Hi,
I have gote the following data
x1 <- c(rep(1,6),rep(4,7),rep(6,10))
x2 <- rnorm(length(x1),6,1)
data <- data.frame(x1,x2)
and I would like to compute the mean of the x2 for each individual of x1, i. e. x1=1,4 and 6?
Thank you very much in advance,
Amori
[[alternative HTML version deleted]]
2009 May 27
2
boxplot
Hi gues,
Is there any function in R for boxplot with different time points?
t1 <- c(rep(1,20),rep(2,20))
t2 <- c(rep(1,10),rep(2,10),rep(1,10),rep(2,10))
x <- rnorm(40,5,1)
dat <- data.frame(t1,t2,x)
boxplot(x~t1,t2)
Many thanks,
Amor
[[alternative HTML version deleted]]
2008 Aug 22
4
swap
Hello everybody,
I wonder if there is any swap function in R that does the following:
x <- seq(1,10,12)
x1 <- swap(x)
x1
1 8 3 4 5 6 7 2 10
Thank you very much!
Amor
__________________________________________________
Schutz gegen Massenmails.
[[alternative HTML version deleted]]
2011 Apr 13
5
Clearing Console; of weeks of codes!
Dear All:
I do see I have weeks of codes in my console when I check with my arrow up
keys. I have been clearing them with Control L but it seems to clear it
clear the screen temporally. I do see the previous codes again when I open R
the next day, after quitting the session!
Q:
How do I clear this?
Thanks;
YA
--
View this message in context:
2010 Aug 27
3
predict.loess and NA/NaN values
Hi!
In a current project, I am fitting loess models to subsets of data in
order to use the loess predicitons for normalization (similar to what
is done in many microarray analyses). While working on this I ran into
a problem when I tried to predict from the loess models and the data
contained NAs or NaNs. I tracked down the problem to the fact that
predict.loess will not return a value at all
2011 Mar 08
4
beamer overlays with Sweave?
This may be asking too much, but I'm wondering if anyone has a
solution (even a hack) for creating multiple (overlay) plots in an
Sweave file and post-processing the overlays in beamer appropriately.
For example, suppose I have a series of figure blocks in my .Rnw file:
<<plot1,fig=TRUE>>=
[stuff]
@
<<plot2,fig=TRUE>>=
[stuff]
@
<<plot3,fig=TRUE>>=
2011 Apr 08
3
xyplot, groups and colors
Dear ExpeRts,
I am trying to plot a bunch of growth curves and would like to get
some more control over groups and line colors than I seem to have.
Example:
# make some data
dat <- Orange
dat$group <- ifelse(dat$Tree%in%c('1','4','5'), 'A', 'B')
# plot
xyplot(circumference~age, dat, groups=group)
# now use lines to make the growth curve more
2010 Aug 05
6
64-bit R on 64-bit Windows box... Still not enough memory?!
I have a 64-bit windows box -
Intel Xeon CPU E7340 @ 2.4GHz 31.9GB of RAM
I have R 2.11.1 (64bit) running on it.
My csv data is 3.6 GB (with about 15 million obs, 120 variables.)
------------------------------------------------
I have successfully imported the data above into R. No problem.
Now I am trying to run 'rpart' on my data. But I got the following error :
Error: cannot
2011 Apr 19
5
Simple Missing cases Function
Dear all
I have written a function to perform a very simple but useful task which I
do regularly. It is designed to show how many values are missing from each
variable in a data.frame. In its current form it works but is slow because I
have used several loops to achieve this simple task.
Can anyone see a more efficient way to get the same results? Or is there
existing function which does
2011 Mar 29
7
Using graphics straight from R into published articles
Hi,
I have been working with R for the past couple of years; analyzing data and
producing some graphics.
I was just wondering if people use graphics from R straight into articles or
are they always edited in some way; fonts, headers, axis, color etc? Using
photoshop or some other programs?
I would like to think it is possible, better and more profession to do it
all in R.
I tried google and
2011 Apr 27
1
read.table: fill=T for header?
Dear ExpeRts,t
I am trying to read tab delimted data produced by somewhat brain dead
software that seems to think it's a good idea to have an extra tab
character after the last column - except for the header line. As
explained in the help page, read.delim now assumes that the first
column contains the row.names (which is not even wrong) but now and all
col.names get shiftet by one column.
2010 Oct 15
1
Help with R
Dear Sir/Madam;
I'm not sure whether this is the correct contact for help.
I've been recently working with R on my project, unfortunately It sudenly crashes!
It gives me the following message:
"FATAL ERROR: unable to restore saved data in .RDATA"
I decided to uninstall the copy (a R2.11.0) and installed a new version (2.11.1) but I'm still receiving the same message. When I
2009 Jun 16
2
Superscript in y-axis of plot
Dear all,
I've been trying to superscript the '2' in the following command (I don't want the '^' displayed), but as yet haven't had much luck. I've tried both the paste and expression commands, but neither have brought me any joy!
mtext(side=2, line=5.5, "Monthly Precipitation (mm x 10^2/month)", font=2, cex=1.1)
Any advice would be much appreciated,
2009 Jul 29
1
(no subject)
HiI am contacting you regarding a problem with downloading R. I cannot seen to manage because my computer language is in Norwegian. DO you know if there is R that can deal with Norwegian letters?
Øistein Harsem
_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
[[alternative HTML version deleted]]
2009 Sep 02
2
Help with sub-setting data.frame
Friends
I have a data frame, df that I want to extract some rows from
Here is a sample of the data
> head(df)
TDate Expiry Underlie Strike CSettle PSettle Futures ExDate
TTE
1 20080102 200801 200803 0.840 0.0000 0 0.9207 20080104
0.005479452
2 20080102 200801 200803 0.850 0.0000 0 0.9207 20080104
0.005479452
Rate Disc
1 0.0457 0.9997496
2 0.0457
2009 Sep 04
1
generation of eps image
Hi,
Except the function postscript ('file_name.eps'), are there functions to generate an image file in eps format?
thanks
Carol
[[alternative HTML version deleted]]
2009 Oct 16
1
Converting dataframe to matrix
Hi,
I'm experimenting with a few learners that require a matrix as their
input. (Currently svmpath, vbmp, etc.)
I currently have a dataframe with 50 columns and 20,000 rows.
I tried using:
x <- as.matrix(my_data.frame)
If I then as, "is.matrix(x)", I get TRUE.
However everywhere I've tried to use the matrix returns errors.
Is there a step I'm missing?
Thanks!
-N
2010 Oct 23
1
Change column of numbers in data frame to days
Hello,
I have seen a few posts about changing a vector of numbers to days of the
week where the numbers are 1-7. I have a similar problem with a twist.
I have a vector of numbers ranging form 20 to 500. The numbers represent
days since a starting point. The list is not consecutive, some numbers
skipped and some numbers duplicated. I know day 1 was a Monday. I want to
use this vector in a lm
2010 Nov 24
4
shifting down ylab in a plot
Hi guys,
I am trying to shift down the "ylab" of my plot but can't find how to do it.
I tried to tune "mar" but it enable more room for the labels to be displayed
but it does not move to "ylab" as I would like.
Is there a way with "par" to shift down my "ylab" ??
Cheers
--
View this message in context: