similar to: Dataframe help

Displaying 20 results from an estimated 200 matches similar to: "Dataframe help"

2017 Oct 12
4
comparing two strings from data
Hi, I have two columns that contain numbers along with letters (as shown below) and have different lengths. Each entry in the first column is likely to be found in the second column at most once. For each entry of the first column, if that entry is found in the second column, I would like to get the corresponding index. For instance, if the first entry of the first column is 5th entry in the
2017 Oct 12
0
comparing two strings from data
It's generally a very good idea to examine the structure of data after you have read it in. str(data2) would have shown you that read.csv() turned your strings into factors, and that's why the == operator no longer does what you think it does. use ... data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE) ... to turn this off. Also, the %in% operator will achieve
2017 Oct 13
1
comparing two strings from data
Combining and completing the advice from Greg and Boris the complete solution is two lines: data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE) match_list <- match( data_2$data1, data_2$data2 ) The vector match_list will have the matching position when it exists and NA's otherwise. Its length will be the same as the length of data_2$data1. You should get
2008 Nov 25
2
dataframe
hi there I have a dataframe abc 123 345 abc 345 456 lmn 567 345 hkl 568 535 lmn 096 456 lmn 768 094 i want the uniques of column 1 and there corresponsing column 2 and 3 output abc 123 345 lmn 567 345 hkl 568 535 cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)]) but didnt work kindly let me know how to go abt it ramya -- View this message in context:
2008 Nov 05
3
Dataframe help
Hi there, I have a dataframe length.unique.info > length.unique.info abc 12 345 def 16 550 lmn 6 600 I want those names that fall under the condition (length.unique.info[,2][i] <=5 && length.unique.info[,3][i] >=500) abcder<-length.unique.info[which(length.unique.info[,2][i] <=5 && length.unique.info[,3][i] >= 500),1] will "&&" look for
2008 Nov 21
3
list of list objects
hi there, I have a list of list objects i need to remove the top layer [[1]] [1].0 "ABC" "DEF""LMN" [1].1 "WER" "ERT" "TRY" [[2]] [2].0 "ASD","wer""qwe" [2].1 "wdv""ghj""ggj" I wanna avoid the top layer...that is [[1]] [[2]] shouldnt be there just a simple list is wat i need.
2012 Jul 18
2
How to have original (name) order after melt and cast command
Dear R helpers, I have a data.frame as given below - dat1 = data.frame(date = as.Date(c("3/30/12","3/29/12","3/28/12","3/27/12","3/26/12", "3/23/12","3/22/12","3/21/12","3/20/12", "3/30/12","3/29/12","3/28/12","3/27/12",
2011 Mar 29
3
Reversing order of vector
Dear R helpers Suppose I have a vector as vect1 = as.character(c("ABC", "XYZ", "LMN", "DEF")) > vect1 [1] "ABC" "XYZ" "LMN" "DEF" I want to reverse the order of this vector as vect2 = c("DEF", "LMN", "XYZ", "ABC") Kindly guide Regards Vincy [[alternative HTML
2010 Feb 10
4
Readjusting the OUTPUT csv file
Dear R helpers   I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and PQR, I am passing the specifications of these variables to input1.csv, input2.csv and input3.csv respectively.   This means in another case even if I
2010 Jan 18
2
Predict polynomial problem
I have a function that fits polynomial models for the orders in n: lmn <- function(d,n){ models=list() for(i in n){ models[[i]]=lm(y~poly(x,i),data=d) } return(models) } My data is: > d=data.frame(x=1:10,y=runif(10)) So first just do it for a cubic: > mmn = lmn(d,3) > predict(mmn[[3]]) 1 2 3 4 5 6 7 8
2013 Apr 26
2
Splitting data.frame and saving to csv files
Dear R Forum, I have a data.frame as df = data.frame(date = c("2013-04-15", "2013-04-14", "2013-04-13", "2013-04-12", "2013-04-11"), ABC_f = c(62.80739769,81.04525895,84.65712455,12.78237251,57.61345256), LMN_d = c(21.16794336,54.6580401,63.8923307,87.59880367,87.07693716), XYZ_p = c(55.8885464,94.1358684,84.0089114,98.99746696,64.71083712),
2008 May 18
2
Rendering data in tables
Hello all, I am new to Rails. I don''t know whether it is possible are not. In my application, I need get data from one table , then arrange these data in table in textfield, then I need to edit data in all rows in single form. At the end I need to save these data back to databse. How can I do this Is this possible <%= tag("input" , {:type => '''',
2006 Apr 26
2
migrations and database creation
Is there a way to pass the database name in config/database.yml to a migration task such that the appropriate (test, development or production) DB is created by the initial migration? What I would like to do is to get this sort of thing to work: class RbacDataStructures < ActiveRecord::Migration def self.up create_database <<dbname from database.yml>> class
2001 Oct 02
1
problem with while loop with next (was RE: file connection, w hile, readLines and browser)
Dear R-help, I think I have kinda isolated the problem I had to the following: i <- 0 while( {i <- i + 1} < 5) { if(i < 3) next print(i) } This seems to go into an infinite loop. After I break the execution, i has the value 1. At the R prompt, if I start from i <- 0 and keep typing {i <- i + 1} < 5, it eventually evaluate to TRUE. So why does the while loop not work?
2001 Oct 02
1
RE: problem with while loop with next
Prof. Tierney, Thanks very much for the info. Why does the loop work if I move the assignment out of the condition? E.g., the following works: i <- 0 while(i < 5) { i <- i + 1 if(i < 3) next print(i) } Regards, Andy > -----Original Message----- > From: Luke Tierney [mailto:luke at nokomis.stat.umn.edu] > Sent: Tuesday, October 02, 2001 3:36 PM > To: Liaw, Andy
2017 Aug 25
4
[Bug 2765] New: ssh-copy-id appears to hang indefinitely when the target user has no password
https://bugzilla.mindrot.org/show_bug.cgi?id=2765 Bug ID: 2765 Summary: ssh-copy-id appears to hang indefinitely when the target user has no password Product: Portable OpenSSH Version: 6.6p1 Hardware: All OS: Linux Status: NEW Severity: trivial Priority: P5
2015 Nov 20
6
[Bug 2503] New: The sshd log files are insufficient to detect sessions
https://bugzilla.mindrot.org/show_bug.cgi?id=2503 Bug ID: 2503 Summary: The sshd log files are insufficient to detect sessions Product: Portable OpenSSH Version: 7.1p1 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: sshd Assignee:
2011 Sep 14
3
secret=pw in sip.conf affecting inter-asterisk sip call
I was trying to do a SIP call between two Asterisk servers (1.4.21.2) 1) On the caller server, I coded the following in extensions.conf Dial(SIP/1166:password at asterisk-callee); 2) On the callee server, I coded the following in sip.conf [1166] type=friend ; Friends place calls and receive calls context=incoming ; Context for incoming calls from this user
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers #I have a data panel of thousands of firms, by year and industry and #one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not #and another variable the represents the firm dimension (total assets in thousand of euros) #I need to create two separated samples with the same number os firms where #one firm in the first have a corresponding
2017 Oct 17
2
Auth failure messages
Folks I am using sendmail as my mail server. SELINUX is disabled. I observe messages in Centos 7 (and 6) in /var/log/messages, similar to: saslauthd[2765]: do_auth : auth failure: [user=bettie] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error] I guess that this is because somebody tried to access one of the SMTP ports with a logon attempt. This is understandable; there are