search for: condense

Displaying 20 results from an estimated 286 matches for "condense".

Did you mean: condensed
2010 Aug 25
1
GLM outputs in condensed versus expanded table
Hi I'm having different outputs from GLM when using a "condensed" table V1 V2 V3 Present Absent 0 0 0 3 12 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 7 20 1 0 1 0 0 1 1 0 3 0 1 1 1 6 0 resp=cbind(Present, Absent) glm(resp~V1+V2+V3+I(V1*V2*V3),family=binomial) >Deviance Residuals: [1] 0 0 0 0 0 0 0 0 etc and also coefficients... And when using the...
2016 Apr 08
1
write a function inside the summation in a more condensed form
Dear R Experts that's my original equation > x=c(2,4) > Y1=sum(sapply(1:2,function(i){sum(sapply(1:i,function(j){(3^(x[i]+x[j]))}))})) > y1 [1] 7371 I want to write the inside function (3^(x[i]+x[j])) in a more condensed form cause this will help me when the multiple summations are more than two I've tried the following form > y2=sum(sapply(1:2,function(i){sum(sapply(1:i,function(j){(3^(sum(sapply(i:j,function(l){x[l]}))))}))})) > y2 [1] 819 But it didn't work, it gave another solution Any h...
2006 Jan 10
2
reading contigency tables
Hi all, I need some help using read.ftable to read a contingency table. My columns are organized as follows: order--family--species--location--number of individuals I couldn't figure out how to change the data on my text file to be imported into R; and after you do that, is it possible to convert the table into a data frame? Any tips would be greatly appreciatted! Thanks a lot, Naiara.
2011 Nov 04
3
barplot as histogram
...by filling zero values in for missing ys for the entire range of xs but in my case this would again create a vector too large for R. Is there another way to use the two vectors to create a simulated frequency histogram? Is there a way to create a histogram object (as returned by hist) from the condensed data so that plot would handle it correctly? Thanks in advance, Jesse
2006 Nov 15
0
Condensing queue CDRs into single entry
Hi, When a call is made to a queue and picked up by agents at least 2 CDR entries are made, one from local to the agent's (sip) phone, and from incoming line to Agent. There are other entries generated when other conditions happen, like agent do not pickup phones and so on. Going through the cdr entries, there seems to be no common filelds by which all entries belonging to a single call can
2007 Jun 27
1
Condensed PCA Results
Hello all, I'm currently using R to do PCA Analysis, and was wondering if anyone knew the specific R Code that could limit the output of the PCA Analysis so that you only get the Principal Component features as your output and none of the extraneous words or numbers that you don't want. If that was unclear, let me use linear regression as an example: "lm(y~x)" is the normal
2011 Apr 08
3
a strange behavior with ifelse
I have used R for years but run into a seemingly simple problem involving 'ifelse'. condensed code like this a=c(2,NA,NA,NA,2,2,NA,2,NA,2) b=c(NA,1,1,NA,2,2,2,2,2,2) #I want to combined a and b into c so that c would be a valid number either a or b is not missing c=ifelse(a==1|b==1,1,ifelse(a==2|b==2,2,NA)) cbind(a,b,c) a b c [1,] 2 NA NA [2,] NA 1 1 [3,] NA 1 1...
2011 Sep 22
2
Proportions of a vector
...9, 1/9, 1/9, 1/9, 3/9, 3/9, 3/9, 2/9, 2/9) > Using prop.table gives: Usage (with table) > prob.xm <- round( prop.table(table(xm)), digits=3) > prob.xm xm 1 2 3 4 5 6 0.111 0.111 0.111 0.111 0.333 0.222 But I want the entire length of probabilities, not just a condensed version. Any help is greatl appreciated. -- Thanks, Jim. [[alternative HTML version deleted]]
2010 Dec 23
2
Non-uniformly distributed plot
Hi, I would like to plot a linear relationship between variable x and y. Can anyone help me with scaled plotting and axes so that all data points can be visualized somehow evenly? Plaint plot(x,y) will generate condensed points near (0,0) due to several large data points. Thank you. Eric > x [1] 0.3497630 3.3948900 1.5224900 0.2690660 0.1078720 0.0451689 0.5902680 0.2757550 0.7518450 [10] 1.0059900 0.6524090 2.8066400 0.0269933 0.1373070 0.2829390 1.2300800 0.4364290 0.0555626 [19] 1.1062...
2004 Feb 03
3
[OT] Oldest Telephone
...ight hand to signal the switchboard. The two dry cells inside are dated 1935, and I'm throwing them away because they're leaking acid. Wouldn't it be a kick to be able to ring this phone from an * server and have a conversation. There are several lugs inside: L1, GND, L2, COND (no condenser installed), E, and K. And of course the two battery lugs. Does anyone know anything at all about this set? I realize the CO supplies battery instead of the telephone, but can the phone be modified? Also, am I going to blow a FXS card if I don't get it right? Cheers, Mike
2012 Nov 04
1
Apply same linear model to subset of dataframe
I have applied the same linear model to several different subsets of a dataset. I recently read that in R, code should never be repeated. I feel my code as it currently stands has a lot of repetition, which could be condensed into fewer lines. I will use the mtcars dataset to replicate what I have done. My question is: how can I use fewer lines of code (for example using a for loop, a function or plyr) to achieve the same output as below? data(mtcars) # Apply the same model to the dataset but choosing different com...
2016 Oct 29
3
Stupid vim question
on very large files, vim will condense display - e.g. +-- 8 lines: static inline void php_openssl_rand_add_timeval() -------------------------------------------------------------------------------------------------------------------------------------------------- #endif +-- 29 lines: static int php_openssl_load_rand_file(const char...
2009 Jan 26
2
R crashes when using the RODBC Package
...he final sqlQuery or sqlSave queries. I have no idea why it is crashing. As an aside, I also have trouble with the odbcCloseAll() command - R tends to crash with that, also. I'm running this on Windows XP, Access 2003, R version 2.7.2 Any insights would be greatly appreciated! The condensed version of the code is below. # import the libraries library(RODBC) # Close any existing connections odbcCloseAll() # Connect to database channel <- odbcConnect("database", uid="", pwd="") for ( i in 1:2 ) { # 1. Weekly 2. Mont...
2007 Dec 14
3
Array dimnames
Dear all, Possibly a rudimentary question, however any help is greatly appreciated. I am sorting a large matrix into an array of dim(p(i),q,3). I put each entry into a corresponding matrix (1 of the 3) based on some criteria. I figure this will assist me in condensing code as I can loop through the 3rd dimension of the array instead of generating 3 separate matrices and using the same block of
2007 Jun 25
2
manipulate a matrix
...ample area, and columns = elements. I've been able to view the results in R, but I want to get the results out to a database and a matrix that is 6000-rows x 6000-columns can be very difficult to manipulate in Windows XP. I would to rotate the matrix so that the output would look like the old condensed format in programs like Conoco. Ideally, I would like format to look something like this; Site-row Site-col Jaccard 1 1 1 1 2 .9 1 3 .6 2 1 .9 2 2 1 2 3 .75 Thanks for any help, *********************************************************** John...
2009 Apr 17
3
Create histogram from data matrix
...e are multiple rows corresponding to the same variable level (e.g., "temperature=8, 5 observations" in one row, then the next: "temperature=8, 9 observations", and so on). In other words, the data are not one long vector R can read and plot as a histogram, nor are they condensed. My goal is to create a figure in which one axis is bins (e.g., temperature values) and the other is number of observations in this bin (e.g., number of organisms seen). My question is: Is there a way R can be told to read my data to create a plot like that I desire? So far I have tried s...
2006 May 10
3
Unique?
...000 02163399059 20 1992 1 27 NA SP0026324 8 H 7 25 4 NA 1000000 02163399060 8 1992 1 28 1 SP0072357 8 H 7 25 4 NA 1000000 02163399062 200 How can I use unique to extract the rows that have repeated tripid's only, not a unique value for each variable but only for TRIPID. I then want to condense the unique values by summing the CONVUNIT for each unique value of TRIPID. I posted a similar question last week and received a sufficient answer of how to do this without using uniqe. The solution below worked just fine on this sample data set but the full data set has 446,000 rows of data and m...
2006 Jan 07
8
Using find_by_sql to get the sum of a column
Hello, I was wondering if there was a method in Rails that returns the sum of a column. For example, I have a column called ''score'' and writing a SQL statement such a ''select sum(score) from table_name'' does return the sum of the values in the column. In the past (not too long ago being a newbie), I defined all sorts of methods only to discover that Rails
2009 Oct 18
2
Bug with .First in R 2.10
...rigger an error message for you, because it tries to do things that are specific to my machines. The not-OK one says "skipping .First", as below, and you'll see why it shouldn't be doing that. Obvioulsy, the files need renaming before you can test them. I haven't been able to condense the .First to something more succinct that shows the same fault; saving a modified .First frequently makes the problem go away, seemingly regardless of what the change is. The transcript from the not-OK version is given below Mark -- Mark Bravington CSIRO Mathematical & Information Sciences...
2011 Aug 31
2
Treat an Unquoted Character String as a Data Frame
...ave this code: study="fv02" level="patients" population="itt" noquote(paste(study,level,".",population,sep="")) This produces the desired fv02patients.itt, but it is just an unquoted character string rather than a data frame. Here is a condensed look at my function: waterfall=function(data,title,file) { barplot(height=data$brpercent,main=paste("Best Change in Tumor Volume\n",title)), savePlot(filename=file,type="pdf") } waterfall(data=fv02patients.itt,title="EC-FV-02 ITT Patients",file=fv02_itt_patients_wat...