search for: my_array

Displaying 13 results from an estimated 13 matches for "my_array".

2009 Oct 15
3
populating an array
Hi, Can someone please give me a pointer as to how I can set values of an array? Why does the code below not work? my_array <- array(dim=c(2,2)) my_array[][] = 0 my_array [,1] [,2] [1,] 0 0 [2,] 0 0 for(i in seq(1,2,by=1)){ for(j in seq(1,2,by=1)){ my_array[i][j] = 5 } } Warning messages: 1: In my_array[i][j] = 5 : number of items to replace is not a multiple of replacement length 2: In my_a...
2006 May 31
3
textfield_with_auto_complete - filling two fields
I am going nuts here.. I have a form where users can write a city name (used with auto_complete) - and once they click on the desired city in the dropdown menu - I would like to have the Country field filled automatically as well... Is this possible at all ? If so, can somebody please tell me where I can find some documentation on the subject, or preferrably an example ? Many thanks in
2013 Apr 02
2
Create a vector without using an external 'if statement'
...min_temp 31032013 4 01042013 3 02042013 5 where -999 means that the temperature data is not available (at the moment I cannot change it to NA because I am not the db administrator); suppose also that oggi is 02042013. I need to create an array of all min_temp, having NA where min_temp is -999. my_array <- c(df1$min_temp[df1$mydate==oggi], df2$min_temp[df2$mydate==oggi], df3$min_temp[df3$mydate==oggi]) creates (-999,14,5) while I need (NA,14,5) Can I do it directly while I create my_array, without using an external if statement? Thank you for your help Stefano Sofia AVVISO IMPORTANTE: Quest...
2012 Mar 19
4
[Arrray] grep -v
...39;aaa'') Would return: [''bbb'', ''ccc''] So I tried to use ruby to do it: normally the ''-'' operation should be enough (http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-2D) Here is the code: puppet apply -e '' $my_array=[ "test", "tt" ] $sub_test = [ "tt" ] $result= inline_template("<% my_array-sub_test %>") notice("$my_array") notice("$my_array - $sub_test") notice("$result") '' notice: Scop...
2012 Feb 24
4
Table into a list
...has two columns 1 and 2, and I would like to create a list of the values. Let's say I have : x1 x2 1 a b 2 c d 3 e f 4 g h What I would like to obtain is a,b,c,d,e,f,g,h. I tried without success melt and reshape ( reshape(my_array, direction="long", varying=1:2) ) but I cannot get it work. Thanks a lot !!! thomas -- View this message in context: http://r.789695.n4.nabble.com/Table-into-a-list-tp4418804p4418804.html Sent from the R help mailing list archive at Nabble.com.
2006 Aug 07
4
excel
Can anyone help me ??? I want to export some data into MS excel and create a pie or line chart. How can I export the data? Does it gives any tutorial websites ? thanks for your help! -- Posted via http://www.ruby-forum.com/.
2014 Mar 15
1
FLAC-compress data with Python
Hello, I would like to compress some data, stored in a Numpy Array (Python) with something like (*): flac.compress(my_array) without having to put data in a .wav file, without having to deal with containers, etc., i.e. : *raw data in / raw data out* Do you have an idea on how to do that with FLAC? This could be useful for audio data of course (stored in simple arrays), but also for other kind of sampled data : I can...
2020 Mar 10
2
DWARF .debug_aranges data objects and address spaces
...; Length of ARange Set .short 2 ; DWARF Arange version number .long .Lcu_begin0 ; Offset Into Debug Info Section .byte 2 ; Address Size (in bytes) .byte 0 ; Segment Size (in bytes) .short my_array .short .Lsec_end0-my_array .short .Lfunc_begin0 .short .Lsec_end1-.Lfunc_begin0 .short 0 ; ARange terminator ...but I cannot see documentation anywhere on what a consumer is expected to do with such information, and how *in general* multiple address spaces...
2006 Apr 17
9
ruby on rails book, fundamental question
Hi guys, bought the ROR book. I understand most of it and really like it. There is just on thing I just dont get. Lets take this code for example. def list @products = paginate :product, :per_page => 10 end As far as I understand @products should be some kinda hash or array, with the data of the Database inside. How can I display this array ? One solution is to do it like this (like in
2009 Oct 13
3
Function to find prime numbers
I need to create a function to find all the prime numbers in an array. Can anyone point me in the right direction? Thank you. AJ -- View this message in context: http://www.nabble.com/Function-to-find-prime-numbers-tp25868633p25868633.html Sent from the R help mailing list archive at Nabble.com.
2006 Aug 16
3
separate row averages for different parts of an array
I have an array with 44800 columns and 24 rows I would like to compute the row average for the array 100 columns at a time, so I would like to end up with an array of 24 rows x 448 columns. I have tried using apply(dataset, 1, function(x) mean(x[])), but I am not sure how to get it to take the average 100 columns at a time. Any ideas would be welcomed. thanks, Spencer [[alternative HTML
2010 Aug 03
3
Drop down box in ruby
Hello I''ve only been playing with ruby and rails for a few short weeks, I have an class called time in my libs folder and I want to call an array from this class and populate a drop down box/select box in rails in one of my view pages. everything online is so confusing regarding this.. Just say my array is like this time = [[minute,min,20,50],[hour,hr,10,50]] How would I get a select
2015 Jul 01
5
[LLVMdev] C as used/implemented in practice: analysis of responses
On Wed, Jul 1, 2015 at 12:22 PM, Russell Wallace <russell.wallace at gmail.com> wrote: > I am arguing in favor of a point, and I understand you disagree with it, > but I don't think I'm dismissing any use cases except a very small > performance increment. > I'm sure Google has numbers about how much electricity/server cost they save for X% performance improvement.