Re: [R] Variable Selection for Logistic Regression

2015-12-17 Thread Christiaan Pauw
Lasso is an obvious choice by it may also be interesting to look at the variable importance from a random forest model On 17 Dec 2015 17:28, "Manish MAHESHWARI" wrote: > Hi, > > I have a dataset with approx 400K Rows and 900 columns with a single > dependent variable of 0/1

Re: [R] Extract a predictors form constparty object (CHAID output) in R

2013-10-17 Thread Christiaan Pauw
October 2013 20:18, Christiaan Pauw cjp...@gmail.com wrote: I have a large dataset (questionnaire results) of mostly categorical variables. I have tested for dependency between the variables using chi-square test. There are an incomprehensible number of dependencies. I used the chaid

[R] Extract a predictors form constparty object (CHAID output) in R

2013-10-16 Thread Christiaan Pauw
'shortform' from 'z' # Examples of use of 'shortfom' loglm(shortform, data = ContraceptiveChoice) Thanks in advance Christiaan -- Christiaan Pauw Nova Institute www.nova.org.za __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] SVMREF infinte number of genes

2013-06-17 Thread Christiaan Pauw
-contained, reproducible code. -- Christiaan Pauw Nova Institute www.nova.org.za [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] ffbase, help with %in%

2012-10-01 Thread Christiaan Pauw
]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christiaan Pauw Nova Institute www.nova.org.za

[R] Passing arguments to a function within a function ...

2012-08-07 Thread christiaan pauw
} # This is where the trouble starts: What do I do if I need to pass the argument base.conc=10 or a different option for par= to dose.response() ? At the moment it works becuase it uses the default, which will not be valid in all cases. Thanks in advance Christiaan -- Christiaan Pauw Nova Institute

Re: [R] Passing arguments to a function within a function ...

2012-08-07 Thread christiaan pauw
Thanks Rui It works. On 7 August 2012 11:34, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, Your problem seems simple, if I understand it correctly. Just add an extra argument to the caller function, drep(). Christiaan Pauw Nova Institute www.nova.org.za

Re: [R] Loading Dataset into R continual issue

2012-03-21 Thread christiaan pauw
in eval(expr, envir, enclos) : object 'Pat2006' not found -- Christiaan Pauw Nova Institute www.nova.org.za __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] nice report generator?

2012-03-12 Thread christiaan pauw
]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Christiaan Pauw Nova Institute www.nova.org.za

Re: [R] find and replace string

2011-12-02 Thread christiaan pauw
$01.cfg and so on.. I have already tried strsplit but this will make things more complex... Could you please help me with that? B.R Alex -- Christiaan Pauw Nova Institute www.nova.org.za __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Installing rJava from source on Mac

2011-11-24 Thread christiaan pauw
Hi Everybody I am trying to install the latest version of JavaGD from source but get the following error. trying URL 'http://cran.za.r-project.org/src/contrib/JavaGD_0.5-4.tar.gz' Content type 'application/x-gzip' length 102242 bytes (99 Kb) opened URL

Re: [R] Thank you

2011-11-24 Thread christiaan pauw
And from the side of a ordinary user who opened the page that read: Chapter 1: What is R? two years ago to all of you on this list: Since reading that first page things have changed so that I would get through a normal working day without the software you create and the advice you give. Thank you

Re: [R] List of lists to data frame?

2011-11-16 Thread christiaan pauw
On the face of it this looks like a job for ldply() in the plyr package which specialises in taking things apart and putting them back together. ldply() applies a function for each element of a list and then combine results into a data frame On 17 November 2011 04:53, Sarah Goslee

[R] matrix of chi-square results for all combinations of data frame

2011-10-04 Thread christiaan pauw
Hi everybody I have a questionnaire with a lot of questions that allow for more than one option to be chosen (like a tickbox in a html form). The data captured on a mobile device and is supplied in a format where every option is a separate variable (logical). I want to develop a generic function

[R] Extract named regions from an Excel file using XLConnect?

2011-08-12 Thread christiaan pauw
Hi Everybody In R, the XLConnect package can read and write named region to and from Excel. In order to read a named region with the readNamedRegion function you need to know it's name. You can check is a name exists with existsName, but you still have to know the name. Is there a way to actually

[R] Use a list to 'transport' a collection of data sets and results

2011-07-27 Thread christiaan pauw
Hi Everybody I need to transport some data and results to use another application (Sweave via LyX - where debugging is very difficult) in order to build a report. Is it possible to store a collection of variables of different types (like named integers, matricies, data frames and two lists) all

Re: [R] texi2dvi runs but produces no output

2011-06-17 Thread christiaan pauw
...@gmail.com wrote: On 11-06-16 7:50 AM, christiaan pauw wrote: Hi everybody. Was the problem below ever solved? I have the same problem on Windows 7 with R 2.13.0 and LyX 2 - everything freshly installed. My Rweave.bat and MakeSweave.R files are similar to below (I followed http://wiki.lyx.org

Re: [R] texi2dvi runs but produces no output

2011-06-17 Thread christiaan pauw
}? Is it the fact that Miktex is still in path containing spaces that is causing this? best regrads Christiaan 2011/6/17 Uwe Ligges lig...@statistik.tu-dortmund.de On 17.06.2011 09:24, christiaan pauw wrote: Thanks for the advice. I tried to install the package as instructed. Command and results

[R] Identifying sequences

2011-06-01 Thread christiaan pauw
Hallo Everybody Consider the following vector a=1:10 b=20:30 c=40:50 x=c(a,b,c) I need a function that can tell me that there are three set of continuos sequences and that the first is from 1:10, the second from 20:30 and the third from 40:50. In other words: a,b, and c. regards Christiaan

Re: [R] Identifying sequences

2011-06-01 Thread christiaan pauw
, 2011 at 6:27 AM, christiaan pauw cjp...@gmail.com wrote: Hallo Everybody Consider the following vector a=1:10 b=20:30 c=40:50 x=c(a,b,c) I need a function that can tell me that there are three set of continuos sequences and that the first is from 1:10, the second from 20:30

[R] Question of the XLConnect package

2011-05-30 Thread christiaan pauw
Hi Everybody I have started to learn how to use the XLConnect package and I think it is going to be very helpful to help me to operate between Excel users. Is there a function that can export a dataframe to a Excel sheet and automatically create a named region for every column (excluding the

[R] Math characters in column heading using latex() in Hmisc

2011-03-14 Thread christiaan pauw
Hi Everybody I want to print a latex table containing math characters in the column heading These are the formulae I want to use as column headings. It prints OK from TeX $\sum_{i}\sum_{j}C_{P,i,j,y}\times\mathit{FC}_{i}$, $XU_{alt,y}$, $n$, $\bar{C}_{P,y}$ My plan was to create a character

Re: [R] Math characters in column heading using latex() in Hmisc

2011-03-14 Thread christiaan pauw
[8] base other attached packages: [1] xtable_1.5-6Hmisc_3.8-3 survival_2.36-5 loaded via a namespace (and not attached): [1] cluster_1.13.3 grid_2.12.2 lattice_0.19-17 tools_2.12.2 Best, Ista On Mon, Mar 14, 2011 at 8:33 AM, christiaan pauw cjp...@gmail.com wrote: Hi

[R] User input in R program

2011-01-21 Thread christiaan pauw
HI Everybody Does anyone know of documentation about different ways of obtaining user input in R. I have used readline() but I wondered is there are sophisticated packages that does things like validate answers or generate selection lists. bets regards Christaan [[alternative HTML

[R] Is there a join() function in R ? OR: simulating Combining ggplot2 and Google Maps by David Kahle

2010-12-16 Thread christiaan pauw
Hi everybody Im on R version 2.11.1 on Mac OS X I am working through David Kahle's example of using ggplot2 with Rgooglemaps (found here: https://github.com/hadley/ggplot2/wiki/Crime-in-Downtown-Houston,-Texas-:-Combining-ggplot2-and-Google-Maps). Excellent page by the way. I have downloaded

Re: [R] Is there a join() function in R ? OR: simulating Combining ggplot2 and Google Maps by David Kahle

2010-12-16 Thread christiaan pauw
Thanks Michael I update plyr and it works now. regards, Christiaan On 16 December 2010 13:40, Michael Bedward michael.bedw...@gmail.comwrote: Hi Christiaan, That looks like the join function in the plyr package. Michael [[alternative HTML version deleted]]

[R] Again: wget parameters

2010-08-18 Thread christiaan pauw
Hi Ricardo and everybody In this old post to rhelp you say that the problem was solved but not what the sollution was. I have the same problem now. I want to read a Excel file from a google site that has restricted access so I need to give a username and password at some point. I could not find

[R] RJSONIO install problem

2010-07-13 Thread christiaan pauw
Hi everybody I am trying to install RJSONIO from source in on Mac OS X 10.5.8. I used the Package Installer. The message and sessionInfo is attached below Can someone help me to understand the error message and maybe give hint towards solving the problem thanks in advance Christiaan Message:

[R] duplicated() and unique() problems

2010-06-08 Thread christiaan pauw
Hi everybody I have found something (for me at least) strange with duplicated(). I will first provide a replicable example of a certain kind of behaviour that I find odd and then give a sample of unexpected results from my own data. I hope someone can help me understand this. Consider the

Re: [R] duplicated() and unique() problems

2010-06-08 Thread christiaan pauw
Thanks for your help Petr I think I understand better now. Masechaba$unique[which(is.na(unique(Masechaba$PROPDESC))==FALSE)]=TRUE ^^^ This seems to be strange. At first sight I am puzzlet what result I shall expect from such

[R] Sampling from a Postgres database

2010-01-14 Thread christiaan pauw
Hi Everybody Is there a way in which one can use the RPostgreSQL package to take a sample from a table in Postgres database without having to read the whole table into R regards Christiaan [[alternative HTML version deleted]] __

[R] Installing RPostgreSQL from source on Mac OS X

2009-10-27 Thread christiaan pauw
Hi Everybody I use R2.9.2 on Mac OS X 10.5.2. I tried to install RPostgreSQL from source on CRAN via the package installer. Apparently the program cannot find my C compiler gcc . Here is the output message trying URL ' http://cran.za.r-project.org/src/contrib/RPostgreSQL_0.1-6.tar.gz' Content

Re: [R] RPostgreSQL package and libpq.dll file

2009-10-27 Thread christiaan pauw
Update to R 2.9 As far as I know the RPostgreSQL package doesn't work in R 2.8 2009/9/14 Lore M tchiba...@hotmail.com It still doesn't work. Now, R is asking me for the SSLEAY32.dll. If I download it from the internet, and then put it in the file \R-2.8.1\library\RPostgreSQL\libs, now they

Re: [R] melting columns

2009-10-22 Thread christiaan pauw
Hi Thibault Please give a short example of what the data looks now like and what you want it to look like. regards Christiaan 2009/10/22 Thibault Grava gr...@unbc.ca Hello, I'm using R to run a acoustic analysis software called Seewave. I ask the code to extract a list of variables from

Re: [R] Sweave file generation

2009-10-20 Thread christiaan pauw
I use Lyx (www.lyx.org) with the Sweave noweb report or article class for the same purpose (if I understand you correctly). LyX is a LateX front-end where you can embed long and short R code. You can write the complete R program inside the document. For latex tables the most elegant solution is

[R] RPgSQL installation problem

2009-10-20 Thread christiaan pauw
Hi everybody I am trying to install RPsSQL and get the following error message: When I do ./configure form the untarred source directory I get loading cache ./config.cache checking for crypt in -lcrypt... no No crypt function found When I use the Package installer in R I get

[R] merging dataframes with an unequal number of variables

2009-10-07 Thread christiaan pauw
Hallo Everyone I have the kind of problem that one should never have because one must always plan well and communicate with your team. But now I haven't so here is my problem. I have data coming in on a daily basis from surveys in 10 towns. The questionnaire has 62 variables but some of the

[R] Read and merge a number of .xls files into one dataframe

2009-08-19 Thread christiaan pauw
Hi everybody I have a large number of Excel speadsheets that I want to merge into one R dataframe to process. I can read them one by one with read.xls but I really need a function to read a whole directory at once and merge the columns with the same name into a single dataframe. here is what I

[R] vertical line in xtable

2009-06-17 Thread christiaan pauw
Hi everyone I have created a function that uses xtable to print table of frequencies and percentages with a heading and some sample information (the sample size and missing values). The function and example data is below. I want a vertical line that separates the results from the sample

[R] Horisontal line in xtable

2009-06-17 Thread christiaan pauw
Hi everyone (Pardon the incorrect terminology of my previous post: vertical line...). I have created a function that uses xtable to print table of frequencies and percentages with a heading and some sample information (the sample size and missing values). The function and example data is below.

[R] isolating Hour and minute form date and time

2009-06-10 Thread christiaan pauw
Hi everybody. I have a dataframe that contains a factor with the date information in the format like in the example below: 2009/05/12 11:22:31 AM I have been able to convert it to POSIXt using strptime Now I want to print only the date as one vector and the time in another vector but they must

[R] by and by: using two indices in by() or tapply()

2009-06-10 Thread christiaan pauw
Hi everyone I want to apply a function by two indices. I have a number of surveyors submitting questionnaires. I want to check the time of the first submission for the day for each surveyor and also see a NA is no submission was done on a particular day. This generates a sample of the data:

Re: [R] Delta in time series

2009-06-10 Thread christiaan pauw
Or x=c(2009-03-09 12:00:00,2009-03-09 13:30:00) y=data.frame(x) attach(y) x=as.POSIXlt(x) x[1]-x[2] On Wed, Jun 10, 2009 at 5:04 AM, kojjens.k...@gmx.li wrote: I have time data in the following format: 2009-03-09 12:00:00 2009-03-09 13:30:00 [[alternative HTML

[R] Duplicates and duplicated

2009-05-14 Thread christiaan pauw
Hi everybody. I want to identify not only duplicate number but also the original number that has been duplicated. Example: x=c(1,2,3,4,4,5,6,7,8,9) y=duplicated(x) rbind(x,y) gives: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] x123445678 9 y0

[R] Sweave doesn't do csv.get()

2009-02-27 Thread christiaan pauw
Hi Everybody I use R2.8.0 on Mac OS X. I set up LyX 1.6.1 to use Sweave today. I can compile the test file I found on CRAN ( http://cran.r-project.org/contrib/extra/lyx/) without a problem and the output looks very nice. In the test file the following R code is used. myFirstChunkInLyX= xObs -

Re: [R] Sweave doesn't do csv.get()

2009-02-27 Thread christiaan pauw
It works now. Your help is much appreciated Christiaan 2009/2/27 Frank E Harrell Jr f.harr...@vanderbilt.edu christiaan pauw wrote: Hi Everybody I use R2.8.0 on Mac OS X. I set up LyX 1.6.1 to use Sweave today. I can compile the test file I found on CRAN ( http://cran.r-project.org/contrib

[R] Latex or html output for freq() in prettyR

2009-02-12 Thread christiaan pauw
Hi Everybody I need to create a lot of frequency tables with frequencies and percentages (and cumilative freq and % as well) for a report. freq() in prettyR give more or less what I need. I am trying to export the result of freq() to html but the html doesn't look look the console output. See the

[R] runs.test in by() statement

2009-01-14 Thread christiaan pauw
Hi everybody I am a recent convert from SAS so please excuse me if this is all very obvious: I want to use the runs test {runs.test() in package tseries} to test the randomness of a certain variable in a survey for each interviewer. I tried to us the by() statement but it doesn't seem to work

Re: [R] runs.test in by() statement

2009-01-14 Thread christiaan pauw
) Regards Christiaan On 14/01/2009, christiaan pauw cjp...@gmail.com wrote: exampledata-data.frame(interviewer=rep(letters[1:2], 1), var=round(var=runif(40))) I do the runs test on var and it works runs.test(as.factor(exampledata$var)) I can catagorise the data by interviewer and get means