similar to: Suppressing the Intercept in lm() when using a dataframe for the model

Displaying 20 results from an estimated 6000 matches similar to: "Suppressing the Intercept in lm() when using a dataframe for the model"

2010 Jul 15
2
write.csv() : attempt to set 'append' ignored... Why?
I'm running R 2.11.0 on a 32-bit Windows XP machine. Whenever I try to write a csv file with 'append' set to TRUE, I get this message: attempt to set 'append' ignored. Obviously, this is no good, since R is deleting my previously saved data files, rather than appending to them. What can I do to fix this? -- View this message in context:
2010 Nov 17
2
Looking up the directory a file is located in
Hello everyone, This should be an easy question, I think. I'd like to write a command in a program to set the working directory to whatever directory the file is currently stored in. Suppose I have a file called "myRscript.r", and it's stored in "C:\Rprojects\myRscript.r", and it references other R scripts and data files in the same directory. If I enter the
2011 Apr 21
6
What does the "<<-" operator mean?
I've been reading some code from an example in a blog post ( http://www.maxdama.com/ here ) and I came across an operator that I hadn't seen before. The author used a <<- operator to update a variable, like so: ecov_xy <<- ecov_xy+decay*(x[t]*y[t]-ecov_xy) At first I thought it was a mistake and tried replacing it with the usual <- assignment operator, but I didn't
2011 Jul 06
1
Writing dataframes side by side in a file
Is there a quick and easy way to write data frames side-by-side in a csv file with one column separating them? I could just fill them with empty rows so they all have the same height, then cbind them with empty columns in between, but I'm looking for a more elegant solution, if one exists. Thanks in advance, Cliff -- View this message in context:
2010 Jul 12
2
Accessing files on password-protected FTP sites
Hello everyone, Is it possible to download data from password-protected ftp sites? I saw another thread with instructions for uploading files using RCurl, but I could not find information for downloading them in the RCurl documentation. I am using R 2.11 on a Windows XP 32-bit machine. Thanks in advance, Cliff -- View this message in context:
2010 Sep 21
1
Prime Factorization
Hi everyone, I have a very quick question: Is there a ready-made function in R or any R packages to find the prime factorization of an integer? -- View this message in context: http://r.789695.n4.nabble.com/Prime-Factorization-tp2548877p2548877.html Sent from the R help mailing list archive at Nabble.com.
2013 Mar 06
2
Fwd: How to conditionally remove dataframe rows?
Hi, I have a data frame with two columns. I need to remove duplicated rows in first column, but I need to do it conditionally to values of the second column. Example: Point_counts Psi_Sp 1 A 0 2 A 1 3 B 1 4 B 2 5 B 0
2010 May 12
2
sorting rows of dataframe
Hello: I have a dataframe, where the first column in a month: Month CATCHMENT_ med min max 1 Apr Alknda01 71.68080 11.9406600 196.2753 2 Apr Alknda02 69.44580 12.1065600 196.2753 3 Apr ArialKhan 39.89310 5.8598700 175.4433 4 Apr Arjun01 4.79652 0.0093336 55.7136 5 Apr Arjun02 4.79652 0.0093336 55.7136 6 Apr Arun01 52.42320 0.1571928
2008 Jun 29
1
creating a dataframe using a list of the variable names
Hello, I'm fairly new to R, and despite spending quite some time exploring, testing, and looking for answers, I still have a couple of questions remaining... The first one is about creating a dataframe using a list of the variable names . I get this output file from a database: BOB <- c('A/A', 'C/C', '15/27') MARY <- c('A/A', NA, '13/12') JOHN
2011 Aug 10
2
using if then statements in a dataframe
I used this service several months ago and was very pleased with the response. I have a dataframe with several thousand lines and to each line I need to apply a series of "if else" statements. For each row I need either a value or a blank/NA. Below is the series of if else statements I have been trying without success to integrate into a function such as "apply". if
2012 Jan 11
3
summarizing a complex dataframe
I need some help summarizing complex data frames (small example below): m1_1 m2_1 m3_1 m1_2 m2_2 m3_2 i1 1 1 1 2 2 2 i1 2 1 1 2 2 2 i2 2 2 1 2 2 2 For an arbitrary number of columns (say m1 ?. m199) where the column names have variable patterns, and such that each set of columns is repeated (with potentially unique data) an
2010 Mar 12
5
Vertical subtraction in dataframes
Hello all, I have not been able to find an answer to this problem. I feel like it might be so simple though that it might not get a response. Suppose I have a dataframe like the one I have copied below (minus the 'calib' column). I wish to create a column like calib where I am subtracting the 'Count' when 'stain' is 'none' from all other 'Count' data for
2011 May 16
2
conditional rowsums in sapply
Hi all I have a data frame with duplicate columns and i want to remove duplicates by adding rows in each group of duplicates, but have lots of NA's. Data: dfrm <- data.frame(a = 1:4, b= 1:4, cc= 1:4, dd=1:10, ee=1:4) names(dfrm) <- c("a", "a", "b", "b", "b") dfrm[3,2:3]<-NA dfrm a a b b b 1 1 1 1 1 1 2 2 2 2 2 2 3
2011 Jan 31
2
From data frame to list object
Dear all, let say I have following data frame: > data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6)) x y 1 -1.072152537 a 2 0.382985265 a 3 0.058877377 a 4 -0.006911939 a 5 -2.355269051 a 6 -0.303095553 a 7 0.484038422 b 8 0.733928931 b 9 -1.136014346 b 10 0.503552090 b 11 1.708609658 b 12 -0.294599403 b 13
2011 Jan 31
2
Missing at random
R users: Thanks in advance  How to generate missing at random (MAR)? assaedi76@yahoo.com Thanks [[alternative HTML version deleted]]
2011 Jul 15
3
summarized data set - how to use an "occurs" field
I have a data set with 22 fields and several thousand records in which one field (count) indicates the number of times that each specific combination of the other 21 fields occurred in a bigger and largely unavailable data set. So each record is unique in its combination of field values and has a field that identifies how many multiples of this record actually occurred. Without resorting to
2012 Mar 18
3
Extracting numbers from a character variable of different types
Hello, I have a file which contains a column with age, which is represented in the two following patterns 1. "007/A" or ''007/a" or ''7 /a" ..... In this case A or a means year and I would like to extract only the numeric values eg 7 in the above case if this pattern exits in a line of file. 2. "004/M" or "004/m" where M or m means month
2013 Mar 11
2
how to convert a data.frame to tree structure object such as dendrogram
I have a data.frame object like: > data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd')) x y 1 A Ab 2 A Ac 3 B Ba 4 B Bd how could I create a tree structure object like this: |---Ab A---| _| |---Ac | | |---Ba B---| |---Bb Thanks, Zech [[alternative HTML version deleted]]
2011 Mar 12
2
Merge data under conditions
Dear All, Debuting in R, I'm facing a problem. I have 2 vectors, say 'a' et 'b', and I'd like to merge them according to the proximity of their variable 'time'. How to do to keep elements which satisfy (for example) 'a$time-b$time<0.5'? For example : > a time x 1 1.0 4 2 2.2 5 3 5.2 6 > b time y 1 0 1 2 1 3 3 2 5 4 4 7 5
2004 Nov 18
3
SipTone II
Anybody used the above phone with asterisk I have one working ok for calls, but having a problem with voice mail. Using either the 'Voice mail function key' or dialing 88 (for my system) just gets me to Call Terminated Asterisk CLI shows the error message 'unable to get User name' My Grandstream works ok, asking for User name, then Password Any ideas ? -- Clive Email :