Displaying 20 results from an estimated 1000 matches similar to: "Selecting 3 different hours in a day"
2011 Nov 14
1
Subset of a subset?
Hi All-
I have created a subset of my original csv for the times I am interested in
(9, 12, 3). I have a subset for all of those times then each individually. I
would like to have specific case studies to analyze individually for those
times. For example, I want to look at 2009/06/01-2009/06/10. Is the easiest
way to created a subset of ss? I haven't been able to figure out the easiest
way
2012 Oct 25
2
mean of a value of the last 2 hours
Hello,
I have a data frame somewhat like that:
myframe <- data.frame (ID=c("Ernie", "Ernie", "Ernie", "Bert", "Bert",
"Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012
11:00"), Hunger=c(1,1,1,2,2,1) )
myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
2009 Feb 11
3
Expire plugin does not delete expired mail
Hello.
I use expire plugin with dovecot 1.1.10. See my dovecot -n:
# 1.1.10: /usr/local/etc/dovecot.conf
# OS: FreeBSD 6.3-RELEASE-p9 i386 ufs
syslog_facility: local6
protocols: imap imaps managesieve
ssl_cert_file: /etc/ssl/mail/mail.domain.net.cert
ssl_key_file: /etc/ssl/mail/mail.domain.net.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default):
2011 Sep 23
4
replace multiple string
Hi
I would like to use a bash script that searches files and
subdirectories name in a directory /var/ww/html/web
for a specific string, and when it finds the search string, replaces
the string (old1) with new string (new1), and so on
old2 with new2 ....oldn with newn.
replace_string.sh
#!/bin/bash
for db in $(find /var/www/html/web -name * -exec)
do
sed -e "s/old1/new1/" \
sed
2010 Jun 01
1
loop
Can any one help it will be very kind, loop statements
I have this table and some more records, I want to reshape it
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
TP53 Dis1 Dis2 Dis3 Dis4 Dis5 Dis6
DCI New1 New2 New3 New4
FDI Hi2 H3 H4
GHD I1 I3 I4 I5 I6 I7 I8
I want my new table or matrix to be some thing like this
V1 V2 V3
Tp53 Dis1 Dis2
Tp53 Dis1 Dis3
Tp53 Dis1 Dis4
Tp53 Dis1 Dis5
Tp53 Dis1 Dis6
Tp53 Dis2
2007 Oct 12
1
use 'lapply' to creat 2 new columns based on old ones in a data frame
There is a dataset 'm', which has 3 columns: 'index', 'old1' and 'old2';
I want to create 2 new columns: 'new1' and 'new2' on this condition:
if 'index'==i, then 'new1'='old1'+add[i].
'add' is a vector of numbers to be added to old columns, e.g. add=c(10,20,30
...)
Like this:
index old1 old2 new1
2011 Feb 07
1
Seeking help to define s4 method for 'print'
I have got another question on defining a method for print() function for my
s4 class. Here is my class definition as well as what I have done till now:
> setClass("Me", representation(x1 = "numeric", x2 = "numeric", y1 =
"character"))
[1] "Me"
> setMethod("print", "Me", definition=function(x) {
+ cat("Values
2008 Jun 10
2
convert characters into integers in a matrix
Hello,
I will appreciate any suggestion for this simple problem. I have a matrix of
characters "A", "P", "M".
I want to convert those characters to integers 0,1, 1 respectively. I am
using the following R statements:
exprs.new<-gsub("P",1,exprs)
exprs.new1 <- gsub("A",0,exprs.new)
exprs.new2 <-
2001 Apr 09
5
predict problem
Windows 98
R : Copyright 2001, The R Development Core Team
Version 1.2.1 (2001-01-15)
Dear friends.
How comes this works and produce a single prediction:
x <- rnorm(15)
y <- x + rnorm(15)
predict(lm(y ~ x))
new <- data.frame(x = seq(-3, 3, 0.5))
predict(lm(y ~ x), new, se.fit = TRUE)
pred.w.plim <- predict(lm(y ~ x), new, interval="confidence")
new1 <- data.frame(x=3)
2012 Aug 02
3
text search in r
I am trying to count the number of times that the characters in a string
change
For example-
new=c(AAAABBBBBABBBABB)
I want to find the number of times that B changes to A and the number of
times that A changes to B. I tried the grep command but I only figured out
the positions of when B changes to A when I only need the number of times it
occurs.
--
View this message in context:
2012 Sep 18
2
Formula in a data-frame
Hello all,
I'm new in R, and I have a data-frame like this (dput information below):
Specie Fooditem Occurrence Volume
1 Schizodon vegetal 1 0.05
2 Schizodon sediment 1 0.60
3 Schizodon vegetal 1 0.15
4 Schizodon alga 1 0.05
5 Schizodon sediment 1 0.90
6 Schizodon
2012 Feb 09
2
fill an array by rows
I've dug around but not been able to find anything, am probably missing
something obvious.
How can I fill a three-dimensional (or higher dimension) array by rows
instead of columns.
eg
new1 <- array(c(1:125), c(5,5,5))
works fine for me but fills it by columns and
new2 <- array(c(1:125), c(5,5,5), byrow=TRUE)
throws an error.
Am I missing something obvious? I also tried
2013 Jan 25
1
Recoding variables (without recode() )
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130125/859c4520/attachment.pl>
2012 Oct 21
1
Parameter Matrix
Hallo,
I would like to run a model (differential equations)
with a whole bunch of parameter combinations.
I think the best way of doing this is to put the model
function into a loop and set a matrix with the parameters:
Each row will represent the parameters for one loop.
I know how to compile such a matrix (via another loop,
or by using rbind etc.). However I hope you guys may have
a much
2010 Apr 14
1
Problem trying to plot Vennerable object
Hi,
I'm new to the list so apologies if this has been asked before. I
couldn't find any refs in google.
I recently installed the Vennerable library from Rforge, this required
an upgrade of R to 2.10.0 by the 'pylr' dependency.
However, a very simple command fails:
Vcomb <- Venn(SetNames= c("EOCT", "EOCM"), Weight=c(0, 11841, 24084, 24660))
plot(Vcomb)
2017 Dec 20
1
utils::unzip ignores overwrite argument, effectively
It does give a warning, but then it overwrites the files, anyway.
Reproducible example below.
This is R 3.4.3, but it does not seem to be fixed in R-devel:
https://github.com/wch/r-source/blob/4a9ca3e5ac6b19d7faa7c9290374f7604bf0ef64/src/main/dounzip.c#L171-L174
FYI,
G?bor
dir.create(tmp <- tempfile())
setwd(tmp)
cat("old1\n", file = "file1")
cat("old2\n", file
2008 May 15
2
How to remove autocorrelation from a time series?
Dear R users,
someone knows how to remove auto-correlation from a frequencies time series?
I've tried by differencing (lag 1) the cumulative series (in order to have only positive numbers) , but I can't remove all auto-correlation.
If it's useful I can send my db.
x <- # autocorrelated series
new1<-cumsum(x)
new2<-diff(new1,lag=1,differences = 1)
acf(new2) #
2012 Sep 15
2
How to convert the output of tapply() so that it has the same order as the input?
Hi,
I try to apply a function to subsets of a data.frame. tapply() does the job, but
the as output, I am looking for a vector (not an array/matrix) ordered in the
same way as the original data, so I can simply cbind the result to the original
data.frame. Below is a minimal example.
I know that there are packages that can do these things easier, but I'm looking
for a fast solution not
2006 Apr 22
1
Gruff
I have installed Gruff and am trying to get an example to work i found
at
http://tomcopeland.blogs.com/juniordeveloper/2006/02/charts_and_grap.html.
I have the following code in the controller:
# Send a graph to the browser
def crumpetchartaction
days = 5
g = Gruff::Line.new(500)
g.title = "Crumpets over the past #{days} days"
g.theme_keynote
crumpets_to_date = []
2013 Feb 27
2
matrix multiplication
Hi,
Try this:
#mat1 is the data
res<-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i) {new1<-do.call(rbind,lapply(seq_len(nrow(mat1[-i,])),function(j) {x1<-rbind(mat1[i,],mat1[j,]); x2<-(abs(x1[1,1]-x1[2,1])*abs(x1[1,5]-x1[2,5]))+(abs(x1[1,2]-x1[2,2])*abs(x1[1,6]-x1[2,6]))+(abs(x1[1,3]-x1[2,3])*abs(x1[1,7]-x1[2,7]))+(abs(x1[1,4]-x1[2,4])*abs(x1[1,8]-x1[2,8]))}));new1}))