similar to: Order of columns(variables) in dataframe

Displaying 20 results from an estimated 2000 matches similar to: "Order of columns(variables) in dataframe"

2008 Jul 24
5
How to delete duplicate cases?
Dear R users,   I have a dataframe with lot of duplicate cases and I want to delete duplicate ones which have low rank and keep that case which has highest rank. e.g   > df1   cno      rank 1  1342    0.23 2  1342    0.14 3  1342    0.56 4  2568    0.15 5  2568    0.89   so I want to keep 3rd and 5th  cases with highest rank (0.56 & 0.89) and delete rest of the duplicate cases. Could
2004 Dec 14
5
sort() leaves row names unaffected
Hello, I wonder if I ran into a bug. If I do summary(df1$X1) -> df1.y df1.y a b c d e [1,] 50.74627 8.955224 17.91045 19.40299 2.985075 sort(df1.y) a b c d e [1,] 2.985075 8.955224 17.91045 19.40299 50.74627 my numbers are sorted but do not anymore correspond to the rownames. For me it is counterintuitive that solely the numbers are sorted and not the names. Is
2005 Dec 30
4
AJAX Drag and Drop Detecting Drop Coordinates
This one''s kicking me in the *(&#^. All I want to do is create a draggable item and then detect the coordinates where it is dropped. So my first approach was to just use the draggable_element with :revert => false, like so: <%= draggable_element "my_element", :revert => false %> That works great and lets me drag stuff all over the place. In the scriptaculous
2019 Feb 28
1
Using butt in same mount point that is used for relay
Thank you Pada tanggal Kam, 28 Feb 2019 10.01 mas wanto <wantom428 at gmail.com menulis: > Sam broadcaster and fallback mount > > Pada tanggal Kam, 28 Feb 2019 09.58 Leonardo Oliveira Ortiz < > leonardo.ortiz at marisolsa.com menulis: > >> Hello. >> >> >> >> We are using icecast to relay a radio station on local network and I have >> a
2008 Dec 09
2
Func_ODBC question
Hi I have On func_odbc [EXEC] readhandle=ressqlserver writehandle=ressqlserver readsql=${ARG1} writesql=${ARG1} I'm trying an update on dialplan: exten=> 141,3,Set(dummy=${ODBC_EXEC(UPDATE Tabla set campo = ${EXTEN})}) On Cli: WARNING[3579]: func_odbc.c:353 acf_odbc_read: Error -1 in FETCH [UPDATE Tabla set campo = 4356] Any idea why is this?? The query
2005 Sep 27
2
Integration with NMS AG-E1/T1
I want to replace a custom PBX, that is infront on a IVR system based on OLD NMS AG-E1 Card. The Cards is configurated with CAS Digitalmode, someone can give me some info about Digim Cards CAS configuration i need a conversion Table? I wanto to don't touch configuration on winbox, i want only replace HWPBX box with asterisk. Diagram Telco E1 ===>Proprietary PBX========(CAS)===>IVR
2006 Mar 01
2
Method Calling Problems
Hi all! I am attemping to call a method inside of my LeviUserController named show_userland from my LeviInterfaceController class. No matter how I do it, I keep getting some type of error. If I make the method a class method, then my render_partial inside of show_userland can''t be found. If i call it using @luser = LeviUserController.new; @luser.show_userland; I get an error with a nil
2014 Oct 09
3
Samba4 as BDC on a Win2003 AD_PDC
HI, I have a Windows 2003 as AD PDC. My intention is disable this Windows and use Samba4 instead. I have compiled Samba 4.1.12 on Debian 7 without problems. I followed Samba Wiki to Join this machine to Win domain, without to do the Samba4 provision steps, as mentioned. The join process occurs without errors and all strutcture of Wind2003 was replicated to Samba4. All modifications done on
2011 Aug 26
3
ask for one ogg test stream with cmml subtitle
On Thu, 25 Aug 2011 20:01:11 +1000 Silvia Pfeiffer <silvia at silvia-pfeiffer.de> wrote: > Hi BCXA, > > CMML is deprecated. You should use KATE instead. > > Cheers, > Silvia. ok i admit this statement came as a surprise for me. cmml is about metadate/annotations, how can it be replaced by KATE ( which is mainly about subtitles as far as i can see? startx
2008 Feb 25
3
Avoiding overplotting of text.
Hi all, I am plotting some data, and use text() to get variable names next to points on the graph. What is the best way to make sure that these text labels are readable and not overlapping when two datapoints are close? I've tried using jitter(), but the effect is random and doesn't always give a good result. Any suggestions would be most appreciated. Best regards, Gustaf Example:
2012 Jul 11
4
Help with loop
Hi, I have two dataframes: The first, df1, contains some missing data: cola colb colc cold cole 1 NA 5 9 NA 17 2 NA 6 NA 14 NA 3 3 NA 11 15 19 4 4 8 12 NA 20 The second, df2, contains the following: cola colb colc cold cole 1 1.4 0.8 0.02 1.6 0.6 I'm wanting all missing data in df1$cola to be replaced by the value of df2$cola.
2008 Sep 14
5
difference of two data frames
Hello I have 2 data frames DF1 and DF2 where DF2 is a subset of DF1: DF1= data.frame(V1=1:6, V2= letters[1:6]) DF2= data.frame(V1=1:3, V2= letters[1:3]) How do I create a new data frame of the difference between DF1 and DF2 newDF=data.frame(V1=4:6, V2= letters[4:6]) In my real data, the rows are not in order as in the example I provided. Thanks much Joseph [[alternative HTML version
2008 Jul 16
1
Help regarding arules package
Dear R experts,   I need help to make my little program efficient which now takes 2hrs to complete.   Using arules package I developed set of rules consisted of 900 rules. Now I want to check whether a lower rule is a subset of a higher premises rule. And if it is a subset of higher premises rule then drop this rule. I am using following code but it takes too much time.      nor<-length(rules)
2005 Jun 29
3
return NA
A<-c(1,2,NA,7,5) B<-c(3,4,1,4,1) C<-c(6,5,6,NA,9) D<-c(8,7,4,6,2) df1<-cbind(A,B,C,D) for(i in seq(1,ncol(df1)-1, by=2)) { ifelse(df1[,i]=="NA",df1[,i+1]=="NA",df1[,] ) } Tried several variations but none worked. I wish to find any NA's in column's 1 or 3 and change the numerical value to the right of the " NA"'s . In this case I
2011 Aug 18
2
Best way/practice to create a new data frame from two given ones with last column computed from the two data frames?
Dear expeRts, What is the best approach to create a third data frame from two given ones, when the new/third data frame has last column computed from the last columns of the two given data frames? ## Okay, sounds complicated, so here is an example. Assume we have the two data frames: df1 <- data.frame(Year=rep(2001:2010, each=2), Group=c("Group 1","Group 2"), Value=1:20)
2008 Feb 10
11
data frame question
Hello I have 2 data frames df1 and df2. I would like to create a new data frame new_df which will contain only the common rows based on the first 2 columns (chrN and start). The column score in the new data frame should be replaced with a column containing the average score (average_score) from df1 and df2. df1= data.frame(chrN= c(“chr1”, “chr1”, “chr1”, “chr1”, “chr2”, “chr2”, “chr2”),
2012 Nov 22
4
Data Extraction
Hello, I would appreciate if someone could help me resolve the following: 1. df1[!is.na( X1 | X2 | X3 | X4 | X5),][,1:5] # This does not work 2. Is these message harmful? The following object(s) are masked from 'df1 (position 3)': X1, X2, X3, X4, X5 Thanks, Pradip Muhuri #Reproducible Example set.seed(5) df1<-data.frame(matrix(sample(c(1:10,NA),100,replace=TRUE),ncol=5))
2009 Nov 19
5
Accessing list names in lapply
Hi, When using lapply (or sapply) to loop over a list, can I somehow access the index of the list from inside the function? A trivial example: df1 <- split( x=rnorm(n=100, sd=seq(from=1, to=10, each=10)), f=letters[seq(from=1, to=10, each=10)] ) str(df1) #List of 10 # $ a: num [1:10] -0.801 0.418 1.451 -0.554 -0.578 ... # $ b: num [1:10] -2.464 0.279 4.099 -2.483 1.921 ... # $ c: num
2013 Feb 26
2
merging or joining 2 dataframes: merge, rbind.fill, etc.?
#I want to "merge" or "join" 2 dataframes (df1 & df2) into a 3rd (mydf). I want the 3rd dataframe to contain 1 row for each row in df1 & df2, and all the columns in both df1 & df2. The solution should "work" even if the 2 dataframes are identical, and even if the 2 dataframes do not have the same column names. The rbind.fill function seems to work. For
2011 May 12
2
Simple order() data frame question.
Clearly, I don't understand what order() is doing and as ususl the help for order seems to only confuse me more. For some reason I just don't follow the examples there. I must be missing something about the data frame sort there but what? I originally wanted to reverse-order my data frame df1 (see below) by aa (a factor) but since this was not working I decided to simplify and order by