search for: sabasehrish

Displaying 8 results from an estimated 8 matches for "sabasehrish".

2016 Apr 24
0
Dividing rows in groups
...NA NA 7 4 0.0000000 1.0 8 4 1.0000000 0.0 9 5 0.2222222 1.0 10 5 0.7777778 NA Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Sun, Apr 24, 2016 at 12:02 PM, Saba Sehrish <sabasehrish at yahoo.com> wrote: > Hi Jim > > Thanks a lot. Its really helpful but actually I have around 10,000 columns > & 8000 rows. I simply want to get the weight of each observation in a group > (group is identified by ID). Therefore, I am looking for an easy way to > divide eac...
2016 Apr 06
1
Descriptive Statistics of time series data
Hi I have four variables and the time series data for each variable consists of values for past 10 years on monthly basis. I want to get descriptive stats for these four variables separately (mean, median, sd, min, max). The data I import to R consists of different columns, where each column gives values for one month of a particular year (e.g. March 31st, 2010). Right now R gives descriptive
2016 Apr 10
0
unbalanced number of rows
HiI have a data frame with rows specifying companies (codes are assigned to companies) and columns specify months (monthly data). The data is based on male (M) and female (F) information for each month. Following is an example of how data looks like: 01 02 03 04001 na M M M001 M M M F002 M F F na003 M na na M003 F M M F003 F F M M na= no male/female. Now, I want to firstly add rows with similar
2016 Apr 10
1
working with unequal rows
Hi I have a data frame with rows specifying companies (codes are assigned to companies) and columns specify months (monthly data). The data is based on male (M) and female (F) information for each month. Following is an example of how my data looks like: 01 02 03 04 001 M M M na 001 F M M M 002 M na F F 003 F F F M 003 F F M na 003 M
2016 Apr 24
0
multiplication by groups
Hi I have two data frames as shown below (second one is obtained by aggregating rows of similar IDs in df1.). They both have similar number of columns but rows of df2 are lesser than rows of df1. df1: ID A B 1 1 2 1 0 3 2 5 NA 2 1 3 3 1 4 4 NA NA 4 0 1 4 3
2016 Apr 24
2
Inserting a blank row to every other row
Hi I need to insert a blank row after every row in R data frame. I have achieved it through: df[rep(1:nrow(df),1,each=2),] But it inserts a row with name of previous row, while i want a complete blank row without any name/title. Please guide me Regards Saba
2016 Apr 24
3
Dividing rows in groups
Hi I have two data frames as shown below (second one is obtained by aggregating rows of similar IDs in df1.). They both have similar number of columns but rows of df2 are lesser than rows of df1. df1: ID A B 1 1 2 1 0 3 2 5 NA 2 1 3 3 1 4 4 NA NA 4
2016 Apr 22
2
Finding Highest value in groups
Hi I have two columns in data frame. First column is based on "ID" assigned to each group of my data (similar ID depicts one group). From second column, I want to identify highest value among each group and want to assign the same ID to that highest value. Right now the data looks like: ID Value 1 0.69 1 0.31 2 0.01 2 0.99 3 1.00 4 NA 4