Re: [R] sample (randomly select) to get a number of successive days

2018-12-10 Thread Dagmar Cimiotti
Thank you so much Marc, that is exactly what I need. That will save me weeks of work and additionally I learned a lot. :-) Have a great day! Dagmar Hi, Given that your original data frame example is: myframe <- data.frame (Timestamp=c("24.09.2012 09:00:00", "24.09.2012 10:

Re: [R] sample (randomly select) to get a number of successive days

2018-12-09 Thread Dagmar Cimiotti
Hi Marc, Yes, you got it to the point! That is exactly what I want. But I do not know how to do that. I know how to randomly pick the first day but I do not know how to set a range of values which cover the 25 days starting from that random value. Best, Dagmar Hi, I am confused. As far as

[R] sample (randomly select) to get a number of successive days

2018-12-07 Thread Dagmar Cimiotti
? Dagmar Am 07.12.2018 um 10:30 schrieb Jim Lemon: > Hi Dagmar, > This will probably involve creating a variable to differentiate the > two days in each data.frame: > > myframe$day<-as.Date(as.character(myframe$Timestamp),"%d.%m.%Y %H:%M:%S") > days<-unique(myframe

Re: [R] sample (randomly select) from successive days

2018-12-07 Thread Dagmar Cimiotti
try? Dagmar Am 07.12.2018 um 10:30 schrieb Jim Lemon: Hi Dagmar, This will probably involve creating a variable to differentiate the two days in each data.frame: myframe$day<-as.Date(as.character(myframe$Timestamp),"%d.%m.%Y %H:%M:%S") days<-unique(myframe$day) Then just sample

[R] sample (randomly select) from successive days

2018-12-07 Thread Dagmar Cimiotti
do a simple sample like this mysample <- myframe[sample(1:nrow(myframe), 4,replace=FALSE),] mysample But I need the data from consecutive days in my random sample. Can anyone help me with this? Many thanks in advance, Dagmar __ R-help@r-project.org

Re: [R] My very first loop!! I failed. May I have some start-up aid?

2017-08-22 Thread Dagmar
  [4,] 0.04326174 0.03558258   NA #>  [5,] 0.05102744 0.04230549   NA #>  [6,] 0.05937594 0.04978273   NA #>  [7,] 0.06842678 0.05844826   NA #>  [8,] 0.07832443 0.06780540   NA #>  [9,] 0.08940262 0.06780540   NA #> [10,] 0.10219933 0.06780540   NA #> [11,] 0.11765102 0.06780540 

[R] My very first loop!! I failed. May I have some start-up aid?

2017-08-18 Thread Dagmar
Dear all, I have a data similar to this: myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"), Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00", "25.09.2012 10:00"), Longitude=c("8.481","8.482","8.483","8.481"), Latitude=c("54.753","54.753","54.752","54.751") ) myfr

[R] Unit of cellsize in 'ascgen' from adehabitatMR? Spatialpoints unit?

2017-06-30 Thread Dagmar
sense? I can't find the information anywhere. Best, Dagmar __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.h

Re: [R] beginner question: subset first entry (row) per week - found the answer myself :-)

2017-02-03 Thread Dagmar
Dear all, Now, all the sudden I found the answer myself :-) I did it by: ddply(exdatframe,.(week),function(x) head(x,1)) I'll simply do it for Ernie and Cookiemonster seperate - that is not a big problem. Thanks anyway for your engagement in this group! Dagmar Am 02.02.2017 um

[R] beginner question: subset first entry (row) per week

2017-02-02 Thread Dagmar
ieMonster","CookieMonster"), recordedTime=c("01.01.2017","02.01.2011", "01.01.2011","02.01.2011"), week =c(1,2, 1,2), eatencookies=c(1,

[R] qqplot: bar outline colour?

2016-12-19 Thread Dagmar
Dear all, Apearantly noone in this great mailing list could help me with my problem a couple of days ago. As I still struggle with part of the problem I try to explain my problem differently: # This is my example data: exdatframe <- data.frame(Name=c("Ernie","Ernie","Ernie", "Leon","Leon

[R] ggplot aestetics: beginner question - I am lost in endless possibilites

2016-12-15 Thread Dagmar
# Dear all, # I hope someone can help me with this. I am so lost and can't find a solution even though I spent hours on searching for a solution of that tiny problem. # Maybe someone of you could give me hint? #This is my string: exdatframe <- data.frame(Name=c("Ernie","Ernie","Ernie", "Leon",

[R] drawing a ... barplot (?) along time

2016-12-06 Thread Dagmar
# Dear all, # I hope someone can help me with this, I am kind of desperated even though it doesn't sound to complicated at all. Let's see: # I have a data frame like this: datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"), changepoint =as.POSIXct

Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Dagmar
Ron: That was exactly what I was looking for! Thank you Ron! Also thanks to Ulrik and Jim who tried to help. I learned a lot! Dagmar Am 15.07.2016 um 12:48 schrieb Crump, Ron: Hi Dagmar, I want the names of the weeks on the x axis and the animals on the y-axis. Then, the shading of the

Re: [R] graph: horizontal bar reflecting number of data

2016-07-15 Thread Dagmar
Dear all, dear Jim, Thank you for trying to help Jim. Unfortunately it didn't solve my problem. I want the names of the weeks on the x axis and the animals on the y-axis. Then, the shading of the barplot is supposed to represent the number of data per week. Any help? Dagmar Am 13.07

[R] graph: horizontal bar reflecting number of data

2016-07-13 Thread Dagmar
Dear all, I hope someone can help with my problem: I have a dataframe like this: datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon" ), week =c("1","2", "3", "1","2", "3"), numberdata =c("5","12", "1", "6","2", "5")) datframe I want to create a graph like the attached on

Re: [R] expand dataframe but time gap is not the same

2015-12-11 Thread Dagmar
"2013-08-03 08:13:20 UTC" "2013-08-03 09:15:40 UTC" [13] "2013-08-03 10:18:00 UTC" diff(.Last.value) Time differences in mins [1] 59.0 59.0 59.0 59.0 59.0 59.0 62.3 62.3 [9] 62.3 62.3 62.3 62.3 Bill Dunlap TIBCO Soft

Re: [R] expand dataframe but time gap is not the same

2015-12-09 Thread Dagmar
very good Thank you in advance, Dagmar Am 03.12.2015 um 15:30 schrieb PIKAL Petr: Hi I am not completely sure what you want. Maybe something like datframe$datum<-strptime(paste(datframe[,1], datframe[,2]), format="%d.%m.%Y %H:%M") datframe$datum <- strptime(format(datfram

[R] expand dataframe but time gap is not the same

2015-12-03 Thread Dagmar
Hello, I hope someone can help me with my problem: I have a dataframe like this: datframe <- data.frame(dates=c("02.08.2013","03.08.2013","03.08.2013"), times =c("22:10","4:04", "10:18"), tide =c("NW","HW", "NW")) datframe Timestamp <- paste(datframe$dates, datframe$times) myframe2 <- cbind( Ti

Re: [R] rbind - names in dataframe. Beginner Question

2015-10-29 Thread Dagmar
Hello Rui and Gerrit and Sarah, Thank you very much for your help. I finally got it to work! Have a great day! Dagmar Am 29.10.2015 um 08:38 schrieb ruipbarra...@sapo.pt: > > Hello, > > Try the following. > > > newframe <- myframe > newframe$Hungertype <- with(m

Re: [R] rbind - names in dataframe. Beginner Question

2015-10-29 Thread Dagmar
Hunger=c(1.2,1.3,1.1,2.1,2.2,1.4,3.3),Hungertype =c("Hunger", "Hunger", "Hunger", "bigHunger", "bigHunger", "Hunger","verybigHunger" ) ) myframeresult Does anyone know the solution? Thanks in advance for trying, Dagmar Am

[R] rbind - names in dataframe. Beginner Question

2015-10-28 Thread Dagmar Cimiotti
ot;,"very"), ID=c("Bert", "Bert", "duck"), Hunger=c(2,2,3)) myframesresult Where is my mistake? Very many thanks in advance!! Dagmar __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://st

[R] seq POSIXct and fill in data by Tagmarie

2015-10-20 Thread Dagmar
Hello, This must be a bloody R-beginner question but I just can't find an answer in my beginner books: I have a dataframe like this: myframe <- data.frame (Timestamp=c("24.09.2012 09:00:00", "24.09.2012 10:00:00", "24.09.2012 11:00:00"), Event=c("0.1","0.5","1.2") ) myframe$Timestamp <- as.POS

[R] data$variable=factor(....)

2015-07-11 Thread Dagmar Juranková
Hello everybody, I have a problem with R. I uploaded a questionnaire saved as csv into R and I tried to test independence between two variables. data <- read.csv("C:/Users/Me/Desktop/data.csv")> View(data)> df = read.csv("C:/Users/Me/Desktop/data.csv")> ls() [1] "df" "data"> attributes(d

Re: [R] merge by time, certain value if 5 min before and after an "event"

2014-10-04 Thread Dagmar
Thank you Jean, Petr, Terry, William and everyone else who thought about my problem. It is sooo good that this mailing list exists! I solved my problem using Petr's suggestion, that didn't seem so complicated and worked fine for me. Thanks again and have a great weekend, Dagmar Am

Re: [R] merge by time, certain value if 5 min before and after an "event"

2014-10-02 Thread Dagmar
o assign the location of my animal at the time it was taken to the tide (that means, there was water not only exactly at 10:00 (as taken from official data) but also 5 min before and after). I hope that is more understandable, if not ask again. Thanks for trying to help, Dagmar Am 02.10.2014 um 2

[R] merge by time, certain value if 5 min before and after an "event"

2014-10-02 Thread Dagmar
0", "24.09.2012 09:51:01", "24.09.2012 10:04:50", "24.09.2012 10:05:10") , location=c("1","2","3","1","5") , Event=c("low", "low","high","high","low")) result Anyone knows how do merge them? Best regards, Dagmar __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] where can I download package svIO?

2009-11-18 Thread Dagmar Orlikowski
74057.html). Will there be a new svIO-package the next weeks or is it included anywhere elso now? Thanks for your help, dagmar __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-p