Displaying 20 results from an estimated 700 matches similar to: "how to make lines() meet axis in autoscaled coordinate system?"
2004 Aug 27
1
selecting unique columns of a matrix/data frame
Hi all,
I have a very high dimensional data and apparently there are several
columns that contain similar information (some columns are equal). I
want to form a matrix/data frame consisting of unique columns. Does
anyone have an efficient way of getting out these columns. A small
section of the data frame is given below.
Thanks for helping.
Stephen.
> newdata
[,1] [,2] [,3] [,4] [,5]
2012 Dec 17
3
simplifying code
Dear All,
I was wondering if you could help me with the following:
I have the code:
tin <-0.5
tau <-24
output0 <-10
TIMELOW <-tin
TIMEHIGH <-1*tau
TIME1 <-c(seq(TIMELOW,TIMEHIGH, by = sign(TIMEHIGH-TIMELOW)*(tau-tin)/3))
then I would like to calculate:
cp1 <-output0*exp(-0.3*TIME1[1])
cp2 <-output0*exp(-0.3*TIME1[2])
cp3 <-output0*exp(-0.3*TIME1[3])
cp4
2008 Nov 10
2
as.Data with minutes resolution
Hi,
I have a vetor os dates with day and hour:minutes.
> time1 <- c("03/08/08-11:00","03/08/08-11:10")
> time1 <- as.Date(time1,"%d/%m/%y-%R")
> summary(time1)
Min. 1st Qu. Median Mean 3rd Qu.
Max.
"2008-08-03" "2008-08-03" "2008-08-03" "2008-08-03" "2008-08-03"
2004 Aug 26
2
text() with text, variables and math HOWTO?
Hello,
One more question from the 'abusing R for blotting - particularly
anally' department:
How can I in the expression below make the '%~~%' show up as the
aprrox-sign I want it to be?
Thanks for any hint,
Joh
text(
500,1.5,
cex=0.75,
substitute(
paste(
OD[600][~nm],
" of 1 at ",
time1,
" min ",
"%~~%",
time1h,
2008 Apr 09
2
fuzzy merge
Hi,
I would like to merge two data frames. It is just that I want the merging to be done with some kind of a fuzzy criterion. Let me explain.
My first data frame looks like this :
ID1 time1 dt
1 2008-01-02 13:11 10
2 2008-01-02 14:20 20
3
2007 Jan 19
4
Newbie question: Statistical functions (e.g., mean, sd) in a "transform" statement?
Greetings listeRs -
Given a data frame such as
times
time1 time2 time3 time4
1 70.408543 48.92378 7.399605 95.93050
2 17.231940 27.48530 82.962916 10.20619
3 20.279220 10.33575 66.209290 30.71846
4 NA 53.31993 12.398237 35.65782
5 9.295965 NA 48.929201 NA
6 63.966518 42.16304 1.777342 NA
one can use "transform" to
2010 Nov 15
3
merge two dataset and replace missing by 0
Hi r users,
I have two data sets (X1, X2). For example,
time1<-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 )
outpue1<-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 ,2 ,1 )
X1<-cbind(time1,outpue1)
time2<-c( 0 ,8 ,15 , 22 ,43 , 64 ,85 ,106 ,148)
output2<-c( 5 ,5 ,4 ,5 ,5 ,4 ,1 ,2 , 1 )
X2<-cbind(time2,output2)
I want to
2012 Jan 19
1
Legend problem in line charts
Hi all,
Small problem in generating the line charts.
Question: Legend for the first graph is coming wrong., for second graph correctly. Please fix the legend postion at the down of graph.
Plesae give me the solution.
Thank you
Devarayalu
Orange1 <- structure(list(REFID = c(7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9), ARM = c(1, 1, 1, 1, 2, 2, 2, 2, 1, 1,
1, 1, 2, 2, 2,
2008 Aug 02
4
RE SHAPE package question.
Hi there,
I am trying to reorganized my data sets so that it is easy for MARK to read
it.
Basically I have the encounter histories of 1837 butterflies
The data looks like this the first 4 columns are the occasions and the last
two code for male and female
> t1 t2 t3 t4 M F
> 1 0 0 0 1 0 male capture on time1 but not seen on time 2, 3
> and 4
> 1 0 0 0
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
Further pursuing my curiosity to measure the efficiency of R/C++ interface, I
conducted a simple matrix-vector multiplication test using .C and .Call
functions in R. In each case, I measured the execution time in R, as well as
inside the C++ function. Subtracting the two, I came up with a measure of
overhead associated with each call. I assume that this overhead would be
non-existent of the entire
2010 Jan 16
2
Extracing only Unique Rows based on only 1 Column
To Whomever is Interested,
I have spent several days searching the web, help files, the R wiki
and the archives of this mailing list for a solution to this problem,
but nonetheless I apologize in advance if I have missed something
obvious.
The problem is this; I have a 5-column data frame with about 4.2
million rows, and want to create a new (and hopefully much smaller)
data frame that
2010 Sep 02
2
date
Hello all,
I've 2 strings that representing the start and end values of a date and
time.
For example,
time1 <- c("21/04/2005","23/05/2005","11/04/2005")
time2 <- c("15/07/2009", "03/06/2008", "15/10/2005")
as.difftime(time1,time2)
Time differences in secs
[1] NA NA NA
attr(,"tzone")
[1] ""
How can i
2012 Dec 13
1
duplicated.data.frame() and POSIXct with DST shift
Hi,
I encountered the behavior, that the duplicated method for data.frames gives "false positives" if there are columns of class POSIXct with a clock shift from DST to standard time.
time <- as.POSIXct("2012-10-28 02:00", tz="Europe/Vienna") + c(0, 60*60)
time
[1] "2012-10-28 02:00:00 CEST" "2012-10-28 02:00:00 CET"
df <-
2012 Oct 23
2
plotting multiple variables in 1 bar graph
I'd greatly appreciate your help in making a bar graph with multiple
variables plotted on it. All the help sites I've seen so far only plot 1
variable on the y-axis
Data set:
I have 6 sites, each measured 5 times over the past year. During each
sampling time, I counted the occurrences of different benthic components
(coral, dead coral, sand, etc.) over 5 transects in each site
site
2011 May 01
1
Mean/SD of Each Position in Table
I have 100+ .csv files which have the basic format:
> test
X Substance1 Substance2 Substance3 Substance4 Substance5
1 Time1 10 0 0 0 0
2 Time2 9 5 0 0 0
3 Time3 8 10 1 0 0
4 Time4 7 20 2 1 0
5 Time5
2007 Dec 16
4
improving a bar graph
Hello,
Below is the code for a basic bar graph. I was seeking advice
regarding the following:
(a) For each time period there are values from 16 people. How I can
change the colour value so that each person has a different colour,
which recurs across each of the three graphs/tie epriods?
(b) I have seen much more sophisticated examples using lattice (e.g
each person has a separate
2012 Nov 30
1
help on "stacking" matrices up
Dear All,
#I have the following code
Dose<-1000
Tinf <-0.5
INTERVAL <-8
TIME8 <-matrix(c((0*INTERVAL):(1*INTERVAL)))
TIME7 <-matrix(c((0*INTERVAL):(2*INTERVAL)))
TIME6 <-matrix(c((0*INTERVAL):(3*INTERVAL)))
TIME5 <-matrix(c((0*INTERVAL):(4*INTERVAL)))
TIME4 <-matrix(c((0*INTERVAL):(5*INTERVAL)))
TIME3 <-matrix(c((0*INTERVAL):(6*INTERVAL)))
TIME2
2012 Jan 19
3
Not generating line chart
Hi All,
Can you please help me, why this code in not generating line chart?
library(ggplot2)
par(mfrow=c(1,3))
#qplot(TIME1, BASCHGA, data=Orange1, geom= c("point", "line"), colour= ACTTRT)
unique(Orange1$REFID) -> refid
for (i in refid)
{
Orange2 <- Orange1[i == Orange1$REFID, ]
pdf('PGA.pdf')
qplot(TIME1, BASCHGA, data=Orange2, geom= c("line"),
2012 Jan 20
1
Legend appearance
Hi All,
I want small modification in apperance of legend. I want seperate legend for each graph representing the lines present in that graph only (not all the lines in all graphs) .
Can you please help?
Thank you
Regards
Devarayalu
Orange1 <- structure(list(REFID = c(7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9), ARM = c(1, 1, 1, 1, 2, 2, 2, 2, 1, 1,
1, 1, 2, 2, 2, 2, 1, 1, 2,
2013 Apr 18
2
trouble with write.foreign
I am trying to write a 10000x8 matrix into a text file so I can read it into
SAS.
When I tried using write.table I could not get just 8 columns and 10000 rows
it would just write all the data in a line until it hit the end and went to
the next line.
I tried instead using write.foreign and I got an error message: Error in if
(varnames[v] != names(varnames)[v]) cat("LABEL ", varnames[v],