Storing output of nested loop in R -


I'm new to R, but I'm trying hard to know the ropes. In fact, I feel stupid because I have run many problems but are not able to get desired results. My code is shown below:

  ## Start the parameters fstart & lt; Start the frequency at 960 ## MHz fstop & lt; - 1240 ## MHz closed frequency in BW * & lt; - 5.44 # # If bandwidth offset in MHz & lt; - 100 ##Tod difference in maximum milliseconds f_dwell & lt; - # 1 # spent in millisecond iterations at each search frequency & lt; - # 100 ## Number of iterations to run ## Number of potential frequencies f & lt; - seq ((fstart + bw / 2), (fstop - bw / 2), by = bw) ## To start the frequency table, freq_table & lt; - Matrix (NA, Nero = (2 * offset + 1), ncol = offset) ## Enter the frequency table row (1: (2 * offset + 1) wise according to the random values ​​of possible frequency) {row_value & lt ; -c (sample (f), sample (f, offset-length (f))) freq_table [i,] & lt; - row_value} ## Assign a line from unknown node unknown_ode  < / Pre> 

If I run without it, for loop k, let me change the variable every time However, I wanted to walk in the loop internally and wanted to get the vector of internal values ​​to run the loop every time. I get the length of T as 100, but repeating the value. The first few values ​​(2 R3 or sometimes 4) are different, but the rest are repeated. Why can not I be understood?


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -