Hi,
I have probably basic question, but I would be happy if somebody could help
me with this:
I have a dataframe where I want to assign a value to other column copying
the value in previous row under some condition.
Here is an example (dput on the end of message):
> test[278:290,]
; and then set it equal to "state_new" at the end of each step.
>
> It may be possible to do this as you were attempting above using
> something like "rle", but I think it will be difficult.
>
> Jim
>
>
> On Wed, Jan 21, 2015 at 9:14 AM, zuzana zajkova wro
b
> 12 290 2011-11-19 08:56:54 a b a
> 13 291 2011-11-19 09:19:39 b a b
> >
>
> which results in desired solution.
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-proj
Dear list,
I would like to make heatmaps from my data. Acctualy, I have already done
it, but the issue it that is doesn't work well for all files.
All files have the same structure, after importing them I do few
calculations using the same script, to obtain variables for plotting.
You can find t
Hello,
I would like to ask you for help. I have quite a big dataframe (119 313
rows), this is a part of it:
"jul" "ind" "time" "secs" "geo" "act" "lig" "date.x" "clock" "h" "m" "s"
"d" "mo" "y" "dtime" "land" "date.y" "sriseIC" "ssetIC" "dssetIC" "dsriseIC"
"1207" 14628 5500519 2010-01-19 15:14:5
"20:13", "20:14", "20:15",
"20:16", "20:23", "20:29", "20:30", "20:34", "20:35", "20:36",
"20:38", "20:40", "20:42", "20:43", "20:44", "20:45&quo
16001 5500519
> #20 ok 2010-01-15 06:19:59 40193.51 64 17016001 5500519
>
> #If you need a rolling max,
> library(zoo)
> rollapply(A$lig,2,max,align="right",fill=NA)
> #[1] NA 64 64 44 32 22 13 4 8 8 0 45 64 64 64 64 64 64 51 64
>
>
> A.K.
>
>
>
Hi,
I would appreciate if somebody could help me with this small issue...
I have a dataframe like this (originaly has more than 100 000 rows):
> subz
jultimedtime fixddawnddusk day
101608 15006 2011-02-01 19:14:49 19.24694 noon 7.916667 19.88333 1
1
:06",
"20:07", "20:08", "20:09", "20:10", "20:11", "20:13", "20:15",
"20:20", "20:25", "20:26", "20:29", "20:30", "20:31", "20:35",
"20:36&qu
(idx[length(idx)] == nrow(subz)) idx <- idx[-length(idx)]
> subz$day[idx + 1] <- subz$day[idx]
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 22-03-2013 18:18, zuzana zajkova escreveu:
>
>> Hi,
>>
>> I would appreciate if somebody could help me with
== "midnight")
> x$day[i2] <- x$day[i1]
> x})
> names(tmp) <- NULL
> result <- do.call(rbind, tmp)
>
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 25-03-2013 14:15, zuzana zajkova escreveu:
>
>> Hi Rui,
>>
&g
Hi all,
I would like to ask you for help. I did a dotplot - using dotchart
function.
There are two localites (loc) with values 75 or 56 in my data ZZ.
The f column has 4 levels: P1, S1, S8, R6.
The dataframe is ordered by N value, pchloc value is assign to use "pch" in
plot.
> head(ZZ)
loc f
Hi all,
I would like to ask you for advice. I did a dotplot - using dotchart
function.
There are two localites (loc) with values 75 or 56 in my data ZZ.
The f column has 4 levels: P1, S1, S8, R6.
The dataframe is ordered by N value, pchloc value is assign to use "pch" in
plot.
> head(ZZ)
loc
Hi,
I would appreciate if somebody could help me with following calculation.
I have a dataframe, by 10 minutes time, for mostly one year data. This is
small example:
> dput(test)
structure(list(jul = structure(c(14655, 14655, 14655, 14655,
14655, 14655, 14655, 14655, 14655, 14655, 14655, 14655, 1
pril 2013 14:35, PIKAL Petr wrote:
> Hi
>
> rrr<-rle(as.numeric(cut(test$act, c(0,1,199,200), include.lowest=T)))
> test$res <- rep(rrr$lengths, rrr$lengths)
>
> If you put it in function
>
> fff<- function(x, limits=c(0,1,199,200)) {
> rrr<-rle(as.numeric(cut(x,
Dear list,
I would like to import into R studio txt files coming from Adobe photoshop.
These files contain different measures. The files are apparently common txt
files with columns separate by tab. However with common function
read.table the import process doesn't work and weird symbols appear o
Ãngulo : num -90 90.3 NA -89.7 -90 ...
> $ Ãrea : num NA NA 551 NA NA ...
> $ Altura : num NA NA 16.7 NA NA ...
> $ Anchura : num NA NA 52.5 NA NA ...
>
>
>
> A.K.
>
>
> On Thursday, May 22, 2014 9:11 AM, zuzana zajkova
> wrote:
> Dear list,
>
> I
17 matches
Mail list logo