similar to: generating new data with for loop

Displaying 20 results from an estimated 3000 matches similar to: "generating new data with for loop"

2005 Nov 17
1
Histogram over a Large Data Set (DB): How?
Hi! I'm new to R, and I have a question about how R works with large data sets --- in particular, data sets that come from databases. I'm using R 2.2.0 with the DBI package (0.1-9) and the RMySQL package (0.5-5). My get-my-feet-wet-with-R project is to make a histogram from a data set stored in a MySQL database. In particular, I have a table that describes some observed spam emails.
2007 Jul 14
3
unixtime conversion
Hi, is there an R function to convert unixtime to one of the R time formats (using chron or POSIXct)? Example data: unixtime year month day hour 1183377301 2007 7 2 13 I would like to only use the first column. If such a function does not exist: What would be a good input format for R (I could parse the input using AWK or other GNU/Linux tools). TIA,
2017 Feb 17
6
Turn on SIP debugging from DialPlan
I have some troublesome numbers that I would like to capture the SIP dialogue when I am calling them. When I am about to dial the number, is there any way to turn on SIP debugging in the dial plan before I make the call? (and turn it off after the call is completed?) -------------- next part -------------- An HTML attachment was scrubbed... URL:
2015 Apr 09
1
Script to Program Snom Phones
SNOM phones can be configured using files on a TFTP server. On Thu, Apr 9, 2015 at 11:14 AM, jg <webaccounts173 at jgoettgens.de> wrote: > > Does anyone know how to program Snom phones using a Mac addresses like > what is done with the Ciscos. I have about 50 extensions to be programmed > and I am hoping there is a way on Asterisk to program extensions on the > snom
2009 Jun 10
3
Extracting Sequence Data from a Vector
Thanks in advance. I have a vector of numbers which contain sections that are sequences which increase by a value of 1 followed by a gap in the data and then another sequence occurs, etc: x<-c(1:3, 6: 7, 10:13) From the vector I need to extract 2 items of information A) the first number in the sequence (e.g., 1, 6, 10) and B) how many observations were in each sequence section (e.g., 3,
2008 Mar 27
2
strptime and plot(),lines()
Hello, Im reading Data out of a Database. #v+ rs <- dbGetQuery(con,"SELECT * ... ) attach(rs) #v- There ist a colum I convert into "Time". #v+ > zeit<-strptime(datum,format="%Y-%m-%d %H:%M:%S"); > class(zeit) [1] "POSIXt" "POSIXlt" #v- 1. A plot(zeit,money) plots the Data. All i see on the x-achis are the Days. I would like to see the
2019 Jun 22
1
last login user tracking
On 22/6/2019 16:07, John Fawcett via dovecot wrote: > > You can easily view the value in a readable format with the > FROM_UNIXTIME mysql funciton > > https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_from-unixtime > > To get remote ip > > define the rip field in your table and add it to the primary key > > add %r to the
2024 Mar 22
2
Double buffering plots on Windows
Hello: I want to present a sequence of plots as an animation. As a toy example consider the code function(n){for (i in 1:n){ plot(1:100,sin(i*(1:100)),type="l") title(paste("n=",i)) segments(0,0,100,0,col=2) }} This sort-of works on a MacOS platform, but the rendering of the plots is a bit choppy. Inserting a sleep function allows the plots to evolve smoothly.
2006 Apr 26
1
help using tapply
Dear R-mates, # Here's what I am trying to do. I have a dataset like this: id = c(rep(1,8), rep(2,8)) dur1 <- c( 17,18,19,18,24,19,24,24 ) est1 <- c( rep(1,5), rep(2,3) ) dur2 <- c(1,1,3,4,8,12,13,14) est2 <- rep(1,8) mydata = data.frame(id, estat=c(est1, est2), durat=c(dur1, dur2)) # I want to one have this: id = c(rep(1,8), rep(2,8))
2009 Jul 14
1
ordering dataframe for strata() (PR#13830)
I've been using strata(sampling) and found that if the dataframe to be sampled ("data") consists of repeated measures that are not sorted in order the run will fail on a given stratum. Ordering the dataframe prior to using strata() eliminates this problem. Thanks, Eric -- Eric Vander Wal Ph.D. Candidate University of Saskatchewan, Department of Biology, 112 Science Place,
2008 Aug 15
1
Vectorization of duration of the game in the gambler ruin's problem
Hey fellas: In the context of the gambler's ruin problem, the following R code obtains the mean duration of the game, in turns: # total.capital is a constant, an arbitrary positive integer # initial.capital is a constant, an arbitrary positive integer between, and not including # 0 and total.capital # p is the probability of winning 1$ on each turn # 1-p is the probability of loosing 1$ # N
2009 Jul 07
2
rle
Hallo, I have an other problem, I have this vector signData with an alternation of 1 and -1 that corrispond to the duration of two different percepts. I extracted the durations like this: signData<- scan("dataTR10.txt") dur<-rle(signData)$length Now I would like to extract only the positive duration, e.g. signData <- c(1,1,1,1,-1,-1,-1,1,1,-1,-1) posduration <- c(4,2) I
2017 May 19
2
noinline changes between 3.8 and 4.0?
All, I'm in the process of upgrading an LLVM client from using 3.8 to using 4.0 and am running into the following issue: // compile with: // clang++ -std=c++11 -Wno-c++14-extensions -S -emit-llvm // ~/chrono.cpp -o chrono.ll #include <chrono> #include <ratio> #include <thread> using namespace std; using namespace std::chrono; using tick = ratio<1, 300>; using
2011 Apr 25
1
Trouble Passing a for loop variable (iteration #) to a data frame
Greetings - I am working on a piece of code to simulate vehicle times in and out in each of a number of parking spaces. At this stage, my code basically does what it is supposed to do but for the sequential number of each new parking event for a given space (i.e., the index of the loop variable). Instead of passing the index of the loop variable (iter) to the data frame, it passes the value
2012 Nov 16
3
dovecot: lda(root): Fatal: Invalid user settings. Refer to server log for more information.
I ran dovecot -a and the blizzard of data seemed ok to my limited knowledge. Is there another log I should look into to trace this error down? Dovecot and system info: thufir at dur:~$ thufir at dur:~$ dovecot --version 2.0.19 thufir at dur:~$ thufir at dur:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.1
2008 Jun 19
2
Capturing draggable revert
I''ve seen a few posts about this, but no answers. I would like to be able to call a function when a draggable revert occurs. What I''m trying to do is replace a photo with an icon on drag (which I''ve accomplished), but I need to swap it back if the revert fires. I really, really wish there were an onRevert() option, but there isn''t, so I guess I''ll
2024 Mar 25
1
Double buffering plots on Windows
Hi Paul Is there a concrete working example somewhere that shows how to use these to do an animation on Windows (R Gui &/or RStudio) using base R plot() and friends? I have several old examples somewhere that used to work (R < ~ 3), but now no longer work as before. Date: Mon, 25 Mar 2024 10:43:29 +1300 From: Paul Murrell <paul at stat.auckland.ac.nz<mailto:paul at
2011 Apr 29
1
importing and filtering time series data
Folks, I'm new to R and would like to use it to analyze web server performance data. I collect the data in this CSV format: 1304083104.41,Y,668.856249809 1304083104.41,Y,348.143193007 First column is a <seconds.microseconds> timestamp, rows with N instead of Y need to be skipped and the last column has the same format as the first column, except it's request duration (latency).
2009 Dec 08
6
conditionally merging adjacent rows in a data frame
Hi, I have a data frame and want to merge adjacent rows if some condition is met. There's an obvious solution using a loop but it is prohibitively slow because my data frame is large. Is there an efficient canonical solution for that? > head(d) rt dur tid mood roi x 55 5523 200 4 subj 9 5 56 5523 52 4 subj 7 31 57 5523 209 4 subj 4 9 58 5523 188 4 subj 4 7
2009 Sep 01
1
Read multiple files into dataframe?
Hello, I am fairly new to R programming and am stuck with the following problem. I am trying to read in multiple files (see attached file or at end of email), the files all have the same general header information and different precipitation (avgppt) and area (areasqmi) values. Some times the number of records are different in the files. I want to read in all files (.stdsummary), and create