similar to: how to skip a numeric column for averaging other columns?

Displaying 20 results from an estimated 2000 matches similar to: "how to skip a numeric column for averaging other columns?"

2008 Nov 03
1
IWLS vs direct ML estimation
Hi, I am thinking about IWLS vs ML estimation. When I use glm() for a 2-parameter distribution (e.g., Weibull), I can otain the MLE of scale parameter given shape parameter through IWLS. Because this scale parameter usually converges to the MLE. In this point, I am wondering: i) can you say that the direct MLE, which is obtained by maximizing a likelihood function, is equalvant to the indirect
2008 Sep 29
3
count data with a specific range
Hi there, The data is data<-c(2,6,13,26,19,25,18,11,22,25) I want to count data for these rages: [0~10]: [11~20]: [21-30]: Is anyone can help me? Thank you in advance -- View this message in context: http://www.nabble.com/count-data-with-a-specific-range-tp19732290p19732290.html Sent from the R help mailing list archive at Nabble.com.
2012 May 21
1
help with melt/cast in reshape-package
I'm sorry everyone for the inconvenience of spamming the R-help... Here's the complete post: Hi everyone, > > Since it's quite a while that I used the reshape package, I now feel kind > of rusty. > > I have a data.frame like this: > > > > id Sample.Name Marker Allele.1 > Allele.2 sample_id species
2008 Nov 01
2
calculation for standard normal cumulative distribution
Is there anyone knowing a function or way for standard normal cumulative distribution? ?(z=-0.1)=? also ?(z=?)=0.025 Thank you, -- View this message in context: http://www.nabble.com/calculation-for-standard-normal-cumulative-distribution-tp20282804p20282804.html Sent from the R help mailing list archive at Nabble.com.
2009 Oct 23
5
Change positions of columns in data frame
Hi all, Probably a simple question, but I just can't find a simple answear in the older threads or anywhere else. I've added some new vectors as columns in a data frame using cbind(). As they're all put as the last columns inte the data frame, I would like to move them to specific positions. How do you do to change the position of a column in a data frame? I know I can use
2006 Dec 31
4
Does SQL group by have a heavy duty equivalent in R
I have hundreds of humans who have undergone SNP genotyping at hundreds of loci. Some have even undergone the procedure twice or thrice (kind of an internal control). So obviously I need to find those replications, and confirm that the results are the same. If there is discordance then I need to address it. I tried to use the aggregate function nr.attempts
2008 Mar 19
2
problem with worker status
Hi, I have a page were users can start jobs that may take several hours to run. BackgrounDrb is perfect for me and seems to be working well most of the time but some times I have the following problem: My worker is set up like this: class UploadWorker < BackgrounDRb::MetaWorker set_worker_name :upload_worker set_no_auto_load(true) def create(args = nil ) file = args[:file]
2010 Sep 14
3
how to compute when row length is different
hi guys..please help me with this i am working on two data frames one goes like this: DF1 Sample_id RepairHours Denatured Dose ZeroMean FourtyFiveMean NinetyMean 1 SDM071 0 1 B 60.5 19.0 45.0 2 SDM071 1 1 B 46.0 23.0 42.5 3 SDM071 2 1 B 52.5 24.0 40.0 4 SDM071
2012 May 23
0
data conversion (possibly with reshape package)
Hi everyone, I have an issue with a data conversion. First, I tried it with the reshape-package, but since it's quite a while that I used it, I feel kind of rusty... I have a data.frame like this: id Sample.Name Marker Allele.1 Allele.2 sample_id species 1 01_primer01 Dalb01 165 179
2012 May 21
3
Replace a variable by its value
I have a dataset called "raw-data" . I am trying to use the following code - col_name<-names(raw_data) for (i in 1:(length(names(raw_data))-2)) { tbl=table(raw_data$Pay.Late.Dummy, raw_data$col_name[i]) chisqtest<-chisq.test(tbl) } Say the 1st column of my raw_data is Column1. The idea is when i=1 then raw_data$col_name[i] will automatically become raw_data$Column1 ,
2013 Apr 16
4
Singular design matrix in rq
Quantreggers: I'm trying to run rq() on a dataset I posted at: https://docs.google.com/file/d/0B8Kij67bij_ASUpfcmJ4LTFEUUk/edit?usp=sharing (it's a 1500kb csv file named "singular.csv") and am getting the following error: mydata <- read.csv("singular.csv") fit_spl <- rq(raw_data[,1] ~ bs(raw_data[,i],df=15),tau=1) > Error in rq.fit.br(x, y, tau = tau, ...) :
2011 Aug 01
2
Errors, driving me nuts
Greetings all, I am getting this error that is driving me nuts... (not a long trip, haha) I have a set of files and in these files I want to calculate ttests on rows 'compareA' and 'compareB' (these will change over time there I want a variable here). Also these files are in many different directories so I want a way filter out the junk... Anyway I don't believe that this is
2009 Nov 30
1
RSQLite does not read very large values correctly
Hello, I am trying to import data from an SQLite database to R. Unfortunately, I seem to get wrong data when I try to import very large numbers. For example: I look at the database via SQLiteStudio(v.1.1.3) and I see the following values: OrderID Day TimeToclose 1 2009-11-25 29467907000 2 2009-11-25 29467907000 3 2009-11-25 29467907000 Now I run this R Code: >
2007 Jul 27
5
File.stub!
Hi, I''m trying to stub File.open and whenever I do, rspec blows up with the following error message (undefined method `add'' for nil:NilClass), which seems to happen because method __add in class Proxy is calling #add on global $rspec_mocks, which in turn is nil. Can someone explain what I''m doing wrong, as I can''t seem to stub anything out! Here''s
2013 Jan 22
6
plot two time series with different length and different starting point in one figure.
Hello, I do have two different time series A and B, they are different in length and starting point. A starts in Jan, 2012 and ends in Dec, 2012 and B starts in March, 2012 and ends in Nov, 2012. How can I plot those two series A and B in the same plot? I.E., from Jan. 2012 - Feb, 2012, it would have one data point from A and from Mar, 2012-Nov, 2012, it would have two data points from A and B,
2009 Jul 14
2
How to provide list as an argument for the data.frame()
Hi R -users, i've a table as describe below. I'm reading the numeric value presented in this table to populate a list. #table #============ #X    A    B    C #x1    2    3    4 #x2    5    7    10 #x4    2    3    5 #============ rawData <- read.table("raw_data.txt",header=T, sep="\t") myList=list() counter=0 for (i in c(1:length(rawData$X))) {     print (i)    
2008 Sep 19
2
Error: function cannot be evaluated at initial parameters
I have an error for a simple optimization problem. Is there anyone knowing about this error? lambda1=-9 lambda2=-6 L<-function(a){ s2i2f<-(exp(-lambda1*(250^a)-lambda2*(275^a-250^a)) -exp(-lambda1*(250^a)-lambda2*(300^a-250^a))) logl<-log(s2i2f) return(-logl)} optim(1,L) Error in optim(1, L) : function cannot be evaluated at initial parameters Thank you in advance -- View this
2018 Jan 15
5
barplot that displays sums of values of 2 y colums grouped by different variables
I am trying to create a barplot displaying the sums of 2 columns of data grouped by a variable. the data is set up like this: "city" "n" "y" <br> mon 100 200 <br> tor 209 300 <br> edm 98 87 <br> mon 20 76 <br> tor 50 96 <br> edm 62 27 <br> the resulting plot should have city as the x-axis, 2 bars per city, 1 representing
2008 Sep 12
1
Error in "[<-"(`*tmp*`, i, value = numeric(0)) :
I use "while" loop but it produces an errro. I have no idea about this. Error in "[<-"(`*tmp*`, i, value = numeric(0)) : nothing to replace with The problem description is The likelihood includes two parameters to be estimated: lambda (=beta0+beta1*x) and alpha. The algorithm for the estimation is as following: 1) with alpha=0, estimate lambda (estimate beta0
2011 Dec 02
2
Moving column averaging
# need zoo to use rollapply() # your data (I called df) df <- structure(list(a = 1:2, b = 2:3, c = c(5L, 9L), d = c(9L, 6L), e = c(1L, 5L), f = c(4, 7)), .Names = c("a", "b", "c", "d", "e", "f"), class = "data.frame", row.names = c(NA, -2L)) # transpose and make a zoo object df2 <- zoo(t(df)) #rollapply to get