similar to: How to delete rows based on replicate values in one column with some extra calcuation

Displaying 20 results from an estimated 7000 matches similar to: "How to delete rows based on replicate values in one column with some extra calcuation"

2010 Jun 29
3
How to delete the replicate rows by summing up the numeric columns
Hi, folks, I am sorry that I did not state the problem correctly yesterday. Please let me address the problem by the following codes: first=c('u','b','e','k','j','c','u','f','c','e')
2010 Jun 24
2
count data with a specific range
I would like to prepare the data for barplot. But I only have the data frame now. x1=rnorm(10,mean=2) x2=rnorm(20,mean=-1) x3=rnorm(15,mean=3) data=data.frame(x1,x2,x3) If there a way to put data within a specific range? The expected result is as follows: range x1 x2 x3 -10-0 2 5 1 (# points in this
2010 Jun 21
2
How to predict the mean and variance of the dependent variable after regression
Hi, folks, As seen in the following codes: x1=rlnorm(10) x2=rlnorm(10,mean=2) y=rlnorm(10,mean=10)### Fake dataset linmod=lm(log(y)~log(x1)+log(x2)) After the regression, I would like to know the mean of y. Since log(y) is normal and y is lognormal, I need to know the mean and variance of log(y) first. I tried mean (y) and mean(linmod), but either one is what I want. Any tips? Thanks in
2010 Jun 22
2
Verify the linear regression model used in R ( fundamental theory)
Hi, folks, As I understand, Least-squares Estimate (second-moment assumption) and the Method of Maximum Likelihood (full distribtuion assumption) are used for linear regression. I do >?lm, but the help file does not tell me the model employed in R. But in the book 'Introductory Statistics with R', it indicates R estimate the parameters using the method of Least-squares. However it
2010 Jul 21
2
Variance of the prediction in the linear regression model (Theory and programming)
Hi, folks, Here are the codes: ############## y=1:10 x=c(1:9,1) lin=lm(log(y)~x) ### log(y) is following Normal distribution x=5:14 prediction=predict(lin,newdata=x) ##prediction=predict(lin) ############### 1. The codes do not work, and give the error message: Error in eval(predvars, data, env) : numeric 'envir' arg not of length one. But if I use the code after the pound sign, it
2010 Jun 25
2
Delete rows in the data frame by limiting values in two columns
Hi, folks, Finally Friday~~ Here comes the question: x=c('germany','poor italy','usa','england','poor italy','japan') y=c('Spain','germany','usa','brazil','england','chile') s=1:6 z=3:8 test=data.frame(x,y,s,z) #Now I only concern the countries ('germany','england','brazil').
2012 Aug 29
3
Help on calculating spearman rank correlation for a data frame with conditions
Dear all, Suppose my data frame is as follows: id price distance 1 2 4 1 3 5 ... 2 4 8 2 5 9 ... n 3 7 n 8 9 I would like to calculate the rank-order correlation between price and distance for each id. cor(price,distance,method = "spearman") calculate a correlation for all. Then I tried to use apply(data,list='id',cor(price , distance , method =
2010 Jun 23
1
How to 'understand' R functions besides reading R codes
Apologize for not being clearer earlier. I would like to ask again. Thank Joris and Markleeds for response. Two examples: 1. Function 'var'. In R, it is the sum of square divided by (n-1) but not by n. (I know this in R class) 2. Function 'lm'. In R, it is the residual sum of square divied by (n-2) not by n, the same as in the least squares estimate. But the assumption following
2010 Jul 02
2
how to save summary(lm) and anova (lm) in format?
Hi, folks, I would like to copy the output of summary(lm) and anova (lm) in R to my word file. But the output will be a mess if I just copy after I call summary and anova. ##################### x=rnorm(10) y=rnorm(10,mean=3) lm=lm(y~x) summary(lm) Call: lm(formula = y ~ x) Residuals: Min 1Q Median 3Q Max -1.278567 -0.312017 0.001938 0.297578 1.310113
2010 Jun 18
1
How to calculate the robust standard error of the dependent variable
Hi, folks linmod=y~x+z summary(linmod) The summary of linmod shows the standard error of the coefficients. How can we get the sd of y and the robust standard errors in R? Thanks! [[alternative HTML version deleted]]
2010 Jun 26
1
All a column to a data frame with a specific condition
Hi, folks, Please first look at the codes: plan_a=c('apple','orange','apple','apple','pear','bread') plan_b=c('bread','bread','orange','bread','bread','yogurt') value=1:6 data=data.frame(plan_a,plan_b,value) library(plyr) library(reshape) mm=melt(data, id=c('plan_a','plan_b'))
2010 Sep 02
1
How to generate integers from uniform distribution with fixed mean
Hi, folks, runif (n,min,max) is the typical code for generate R.V from uniform dist. But what if we need to fix the mean as 20, and we want the values to be integers only? Thanks [[alternative HTML version deleted]]
2010 Jun 22
3
OT: Recommendation for a good Internationalized terminal software
Hi all, We've got server-based application that runs on CentOS. Until now, most of our customer's end-users have accessed the application using either PuTTY or Teraterm. I was asked yesterday to try and find internationalized add ons or alternatives for our new Asian customers (Japan, Korea and China atm). I figured if anyone would be able to recommend terminal emulation
2013 Apr 26
1
Error Installing packages
I am trying to install the package boss but i am getting error below: Please advice install.packages("boss") --- Please select a CRAN mirror for use in this session --- CRAN mirror 1: 0-Cloud 2: Argentina (La Plata) 3: Argentina (Mendoza) 4: Australia (Canberra) 5: Australia (Melbourne) 6: Austria 7: Belgium 8:
2008 Sep 23
3
Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
Dear R users, I hope to explain the concepts of skewness and kurtosis by generating series of distributions with same skewness and different kurtosis or with same kurtosis and different skewness, but it seems that i cannot find the right functions. I have searched the mailing list, but no answers were found. Is it possible to do that in R? Which function could be used? Thanks a lot. --
2005 Dec 16
2
strange connection NG
Dear all, I have a devocot server based on fedora core 3 in Japan. When my users are in Japan, there is no any problem reported.Devocot works very well. But when my users are in China, sometimes the following problem occured. Sometimes the user can not download mails, after that all connections attempt to server(e.g http/ssh) failed. the user has to close OutLook, and wait for about 10
2007 Sep 13
2
handle dates in R?
Dear Rusers, I have some data in .csv file like "2004-8-1" and "2004-10-1", and i need to convert them into days from the origin (January 1, 1960). I have tried the function date.mmddyyyy(), but cannot get it. Anybody can show me how to handle the date data? Thanks very much! My dataset like: time 2004-8-1 2004-10-1 2001-9-1 2002-9-1 -- With Kind Regards,
2007 Jun 19
1
Histograms with strings, grouped by repeat count (w/ data)
Hello R gurus, I just spent my first weekend wrestling with R, but so far have come up empty handed. I have a dataset that represents file downloads; it has 4 dimensions: date, filename, email, and country. (sample data below) My first goal is to get an idea of the frequency of repeated downloads. Let me explain that. Some people tend to download multiple times, e.g. if the download fails
2005 Aug 23
2
FW: Register Today for Fall 2005 VON: "The Destination for IP Communications"
Anyone able to get me a comp/highly discounted ticket to this? $150 just to visit the exhibition halls sounds crazy? Dean > -----Original Message----- > From: Jeff Pulver [mailto:jeff@pulver.com] > Sent: Tuesday, 23 August 2005 11:47 AM > To: mailinglist1 > Subject: Register Today for Fall 2005 VON: "The Destination for IP > Communications" > > Hi There, >
2012 Jan 05
7
Blocking countries with shorewall
I''m currently getting a huge number of (failed) attempts to access my home server at UDP port 27845. I think most if not all the attacks come from China or Korea. I see there is a list of Chinese and Korean networks at <http://www.countryipblocks.net/country-blocks/>. Is there a standard way of using such a list in shorewall? -- Timothy Murphy e-mail: gayleard /at/ eircom.net