Displaying 20 results from an estimated 700 matches similar to: "How to delete rows using conditions on all columns"
2011 Nov 16
1
Sequence Prediction
I have a data with the sequence of events with millions records and more than
24 time stamped variables.
sample data:
1 2 3 4 5 6 7 8 9 10
A A A C C C B B D D
D D D D D C C C C C
B B A C A C C C D D
I want to predict sequence for next 3 period. How this can be achieved using
R. Is there any package/function in R do this.
I have gone through the document for package "TraMineR" but not
2010 Jun 09
2
Help needed on "switch" function
Hi all, Here I am trying to implement the switch() function to choose value of a variable depending on the value of an input variable :
temp1 <- "1"
temp1.name <- switch(temp1,
1 == "aa",
2 == "bb",
3 == "cc",
2009 Jul 01
2
?max (so far...)
Hi,
I have a data.frame that is date ordered by row number - earliest
date first and most current last. I want to create a couple of new
columns that show the max and min values from other columns *so far* -
not for the whole data.frame.
It seems this sort of question is really coming from my lack of
understanding about how R intends me to limit myself to portions of a
data.frame. I get the
2009 Feb 11
2
sorting a matrix by the column
this is a bad question but I can't figure it out and i've tried. if i
sort the 2 column
matrix , temp1, by the first column, then things work as expected. But,
if I sort the 1 column matrix, temp2, then it gets turned coerced to a
vector. I realize that I
need to use drop=FALSE but i've put it in a few different places with no
success. Thanks.
temp1 <-
2009 Feb 11
2
error in my previous message
i'm sorry. i had an error in my previous code because i left out a
letter in the rownames.
while fixing that, i also found a solution. so i'm sorry for the
confusion.
below is my fix.
temp2 <- matrix(rnorm(10),nc=1,nrow=10)
rownames(temp2) <-
2003 May 31
1
Minor problem with unwritable directories
Hi,
I'm not a member of the list, but I think I've run across a (minor)
bug. The rsync web page directed me to this list for bug reports.
Anyway, I've described it below (including a simple test case with exact
commands to reproduce and the output I get from those commands). I hope
this helps. Let me know if any more information is needed.
Elijah
P.S. If it isn't a bug,
2006 Jan 04
3
matrix math
I am using R 2.1.1 in an windows XP environment.
I have 2 dataframes, temp1 and temp2.
Each dataframe has 20 variables (“cocolumns") and 525 observations (“rows”). All variables are numeric.
I want to create a new dataframe that also has 20 columns and 525 rows. The values in this dataframe should be the sum of the 2 other dataframe.
(i.e. temp1$column
2011 Dec 12
1
Lagged values problem requiring short solution time
Hello,
I am hoping someone can help tackle the problem below, for which I require a fast solution. It feels like there should be an elegant approach, but I am drawing blanks.
Take a vector 'x' with random values > 0:
x = runif(10,1,5)
Assume some reasonably small positive value 'delta':
delta = 0.75
The task is to find a solution vector 'y' of same length as
2010 Feb 11
0
Regarding a error while plotting R chart using qcc package.
On 11 Feb 2010, at 06:53, Vikrant Shimpi wrote:
> Dear Luka ,
> I am using qcc package in R to plot SPC charts. BUt while plotting
> R chart I had a error. My question is it necessary while plotting
> R Chart the group sample size must be < 25 ?. Because when I took
> group sample size as 1000 it gave me error, till I took group sample
> size as 26, But as sooon as
2008 Aug 26
1
parse and eval character vector
Dear R-help,
I have a character vector, some elements will be numeric, some not,
and some even empty. E.g.:
temp1 <- c("abcd"," 2 ","")
I'm only interested in the numeric elements, the rest I can just throw
away. It is easy enough to loop through the vector:
temp <- try(eval(parse(text=temp1[1])), silent=TRUE); class(temp) # try-error
temp <-
2013 Mar 29
1
multiple plots and looping assistance requested (single plot)
HI Irucka,
Please check this:
temp<- structure(list(`:Bostoncitydata` = structure(list(Month = c(1L,
2L, 3L, NA), Data1 = c(1.5, 12.3, 11.4, NA), Data2 = c(9.1342,
12.31, 3.5, NA)), .Names = c("Month", "Data1", "Data2"), class = "data.frame", row.names = c(NA,
-4L)), `:Chicagocitydata` = structure(list(Month = c(1L, 2L,
3L, 4L, 5L, NA), Data1 = c(1.52,
2010 Nov 19
3
Sweave Dynamic Graph Question
i have a time Series of IBM closing px from 1/1/2000 to today
I want to graph the time serie by dividing the graph by year and month
all the monthly graphs with the same year will go to one page. so from
1/1/2000 to 11/19/2010. i will have
11 pages, and each page will have 12 graphs (jan to dec) except for 2010.
I am able to do it in R, but when i use sweave, I can only print the last
page.
2013 Jul 27
1
GeForce 8800GT fan control
I have a GeForce 8800GT that I am trying to lower the fan speed on.
I can change the fan RPM from high to not-as-high but I want more control over it.
It is too loud and it was quieter with the blob.
Maybe the temps are too high to make it quieter.
# echo 1 >/sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/i2c-6/6-002e/pwm1_enable
# sensors
fam15h_power-pci-00c4
Adapter: PCI adapter
power1:
2009 Jan 10
0
RMySQL CREATE TABLE error
Hi all-
I am stumped. The code in A. returns errors at lines 14 and 15 and fails
to load series1 and series2. However, in B., if temp1 and temp2 are
called again (which returns a "Table exists" error; see lines 14-17 in
B.) series1 and series2 load correctly. Any ideas? Also-I am open to any
suggestions to improve the code as I am a horrific programmer. Thanks
A.
1 >
2010 Oct 14
1
Basic data question
I have a question about the output given below after running few lines of
code. Surely a 101 query!
MF_Data <- read.csv("MF_Data_F.txt", header = F, sep="|")
temp <- head(MF_Data) #Get the sample Data
temp1 <- subset(temp, select= c(V1,V4,V6)) #where V1, V4, V6 are the col
names .. to Get the relevant data
names(temp1) <- c('Ticker',
2006 Mar 03
1
NA in eigen()
Hi,
I am using eigen to get an eigen decomposition of a square, symmetric
matrix. For some reason, I am getting a column in my eigen vectors (the
52nd column out of 601) that is a column of all NAs. I am using the option,
symmetric=T for eigen. I just discovered that I do not get this behavior
when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is
(up to rounding error) a
2005 May 20
4
issues with identical()
Hi all, hope you having a nice day,
I ahve this weird results with identical (probably I am not understanding
correctly what it does ...)
I have these two data frames and I issue :
> identical(temp, temp1)
[1] FALSE
However, these data frames are Nx2 and when I issue:
> identical(temp[,2], temp1[,2])
[1] TRUE
> identical(temp[,1], temp1[,1])
[1] TRUE
and the results from str
>
2009 May 15
4
replace "%" with "\%"
Dear all,
I'm trying to gsub() "%" with "\%" with no obvious success.
> temp1 <- c("mean", "sd", "0%", "25%", "50%", "75%", "100%")
> temp1
[1] "mean" "sd" "0%" "25%" "50%" "75%" "100%"
> gsub("%",
2011 Mar 09
2
Anomaly with unique and match
I stumbled onto this working on an update to coxph. The last 6 lines
below are the question, the rest create a test data set.
tmt585% R
R version 2.12.2 (2011-02-25)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
# Lines of code from survival/tests/singtest.R
> library(survival)
Loading required package: splines
2012 Oct 31
2
Aggregate Table Data into Cell Frequencies
R-help -
I have this set of aggregated tables (sample data below via dput()). And I
would like to have delayValue as the column variables with the "temp"
(temp1, temp2, temp3) values as the row variables. However I would like to
have the temp variables *aggregated into single rows* so that I have the
frequency ("Freq" | counts) of each time each "delayValue" occurs