Hello R Experts,
I want to make sure I understand how the strata, sampsize and replace
parameters work so I can confidently perform downsampling on a dataset I'm
working with.
My main question is when the documentation talks about how each of these
parameters (strata, sampsize, replace) works
Hello R Experts,
I want to make sure I understand how the strata, sampsize and replace
parameters work so I can confidently perform downsampling on a dataset I'm
working with.
My main question is when the documentation talks about how each of these
parameters (strata, sampsize, replace) works
Thank you Duncan!
Dan
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Monday, September 29, 2014 6:23 PM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: Re: [R] Custom Function Not Completely working
On 29/09/2014, 9:07 PM, Lopez, Dan wrote:
>
Hi R Experts,
I'm in the process of creating a set of convenience functions for myself. I am
somewhat new to writing functions in r.
In this example I wanted to load both existing files called KuhnPerform.Rdata
and KuhnPerform.Rhistory. However it only works for loading the .Rhistory file
and
ca.us]
Sent: Wednesday, February 26, 2014 1:19 AM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: Re: [R] libPaths how to change (R 3.0.2 64bit, RStudio 0.98.501,
Windows 7)
What you are really asking is how environment variables get set outside of R,
which is very OS-specific and not on topic
R Experts,
I had a problem when trying to install package tm. The install looked
successful ("Package 'tm' successfully unpacked and MD5 sums checked") but I
could not load it through
library(tm). It kept complaining that tm package was not installed.
So it was through this problem that I reali
02, 2013 8:40 AM
To: arun; R help; Lopez, Dan
Subject: RE: [R] How do I extract Random Forest Terms and Probabilities?
#2 can be done simply with predict(fmi, type="prob"). See the help page for
predict.randomForest().
Best,
Andy
-Original Message-
From: r-help-boun...@r-projec
Hi R Experts,
The info in this link suggests that plot in the pROC package can only compare
two ROC curves at one time.
https://stat.ethz.ch/pipermail/r-packages/2011/001220.html
But this is from a couple of years ago. Curious if that has changed and if
anyone knows how to plot more than one RO
Hi R Experts,
I need your help with two question regarding randomForest.
1. When I run a Random Forest model how do I extract the formula I used
so that I can store it in a character vector in a dataframe?
For example the dataframe might look like this if I am running models using the
IR
(c(0,diff(x))>1,]
I appreciate your response on this.
Dan
-Original Message-
From: MacQueen, Don
Sent: Thursday, November 21, 2013 3:58 PM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: Re: [R] How do I identify non-sequential data?
Dan,
Does this do it?
## where dt is
Hi R Experts,
About the data:
My data consists of people (ID) with years of service (Yos) for each year. An
ID can appear multiple times.
The data is sorted by ID then by Year.
Problem:
I need to extract ID data with non-sequential YoS rows. For example below that
would be all rows for ID 33 an
igelow.org]
Sent: Monday, November 18, 2013 6:00 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] Passing parameters in a user defined function to another
function using ...
Hi,
It's easy, just carry the arguments in '...' forward to where you expect to
p
Hi R Experts,
How do you get the ... to work in a user-defined function such as the one I
have below?
For example if I want to pass replace=TRUE to the sample function.
# This is a sample function that generates x rows of z numbers out of y.
Basically a lottery style data set.
mynumbs<-functio
It's happening in the 64bit installation of R I have too (w/o Rstudio). This is
R version 2.15.1
Dan
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Thursday, November 14, 2013 1:38 PM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: R
Windows 7, R 2.15.1 64bit, RStudio 0.97.312, Rattle 2.6.26
Hi,
Please help.
I removed rattle then reinstalled then loaded then attempted to open rattle
with rattle(). But each time I do that My R session in R studio aborts and
restarts.
remove.packages("rattle")
install.packages("rattle")
libr
This is a great solution! Love the conciseness of your solution. And easy to
understand.
Thanks again.
Dan
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Monday, November 11, 2013 6:31 PM
To: Lopez, Dan
Subject: Re: [R] Update a variable in a dataframe based on
Hi R Expert Community,
My question: What is the difference between Mean Decrease Accuracy produced by
importance(foo) vs foo$importance in a Random Forest Model?
I ran a Random Forest classification model where the classifier is binary. I
stored the model in object FOREST_model. I than ran impo
Hi R Experts,
I need some advice on how to manage the number of models/objects I have in one
workspace.
Below is typically how I get started each time I begin or resume an analysis.
But now I am storing multiple models which are built off of dataframes with
dims of 30,000 x 60.
I am anticipati
Below is how I am currently doing this. Is there a more efficient way to do
this?
The scenario is that I have two dataframes of different sizes. I need to update
one binary factor variable in one of those dataframes by matching on two
variables. If there is no match keep as is otherwise update.
Hi Gabor,
This is a great solution! I will use it.
Thank you!
Dan
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Monday, November 11, 2013 3:02 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] How do I derive a logical variable
Thanks.
Dan
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Monday, November 11, 2013 2:26 PM
To: R help (r-help@r-project.org)
Cc: Lopez, Dan
Subject: Re: [R] How do I derive a logical variable in a dataframe based on
another row in the same dataframe?
Hi,
You
Great advice!
Thank you.
Dan
-Original Message-
From: William Dunlap [mailto:wdun...@tibco.com]
Sent: Monday, November 11, 2013 1:18 PM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: RE: [R] How do I derive a logical variable in a dataframe based on
another row in the same
Hi R Experts,
How do I mark rows in dataframe based on a condition that's based off another
row in the same dataframe?
I want to mark any combination of FY,ID, TT=='HC' rows that have a
FY,ID,TT=='TER' row with a 1. In my example below this is rows 4, 7 and 11.
My data looks something like thi
3 11:08 AM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: Re: [R] Regular Expression returning unexpected results
Please read and follow the Posting Guide, in particular re plain text email.
You need to keep in mind that the characters in literal strings in R source
have to make it into
Hi,
So I just took an intro to R programming class and one of the lectures was on
Regular Expressions. I've been playing around with various R functions that use
Regular Expressions.
But this has me stumped. This was part of a quiz and I got it right through
understanding the syntax. But when I
Hi R Expert Community,
I need your help in getting rggobi and ggobi to work.
I tried running ggobi under Rattle's Explore tab and interactive option but got
an error. I then tested library('rggobi')and noticed I get the same error. So
it's not Rattle specific.
I have GGOBI and rggobi installed
Hi Jeff,
a & b) points taken. Thanks for the reference too.
c) taking the zero's out did the trick.
Dan
-Original Message-
From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us]
Sent: Sunday, April 28, 2013 12:15 AM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subjec
Hello R Experts,
I kindly request your assistance on figuring out how to get a stratified random
sampling proportional to 100.
Below is my r code showing what I did and the error I'm getting with
sampling::strata
# FIRST I summarized count of records by the two variables I want to use as
stra
Daniel,
Thanks for letting me know.
I'll try it w/o Rstudio if needed.
Thanks.
Dan
-Original Message-
From: Daniel J. Robertson [mailto:dj...@cornell.edu]
Sent: Monday, April 22, 2013 1:51 PM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: RE: [R] RODBC --How do you set u
Hello,
I want to leave pwd blank (to comply w/ company security protocol) and just be
prompted by the driver-specific data source dialog box to enter the password
after. But for some reason it is not working.
R Version: "R version 2.15.1 (2012-06-22)"
R Studio Version: 0.97.312
OS: Windows 7
Hi,
We have comment questions from a survey that we need to categorize. What
package and functions can I use in R to help do this?
Daniel Lopez
Lawrence Livermore Labs
SHRM
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
2L, 2L, 2L, 2L, 2L), .Label = c("", "yes"
), class = "factor"), Q16 = structure(c(4L, 4L, 4L, 3L, 3L,
3L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 3L, 4L, 3L,
3L, 3L, 4L, 3L, 4L), .Label = c("", "did not meet expectations",
Hi Bert,
Thanks for drawing my attention to "simplify" argument and for the examples. I
understand know.
Thanks.
Dan
-Original Message-
From: Bert Gunter [mailto:gunter.ber...@gene.com]
Sent: Wednesday, February 20, 2013 4:25 PM
To: Lopez, Dan
Cc: R help (r-help@r-p
20, 2013 4:18 PM
To: Lopez, Dan; David Winsemius
Cc: R help (r-help@r-project.org)
Subject: RE: [R] Sending Email from R
Try replacing
dput(x)
with
capture.output(dput(x))
dput(x) prints a parsable representation of x but returns x. capture.output(y)
returns what print(y) would have prin
R Experts,
I have a dataframe made up of character vectors--these are results from survey
questions. I need to convert them to factors.
I tried the following which did not work:
scs2<-sapply(scs2,as.factor)
also this didn't work:
scs2<-sapply(scs2,function(x) as.factor(x))
After doing either of
can copy and paste as I usually do but just thought
there is an easy way to do it through sendmail.
Thanks.
Dan
-Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: Wednesday, February 20, 2013 4:06 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subjec
pServer="thing.thing.gov")
sendmail(from=from,to=to,subject=subject,msg=body,control=mailControl)
## End(Not run)
Thanks.
Dan
-Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: Wednesday, February 20, 2013 11:59 AM
To: David Winsemius
Cc: Lopez, Dan
Hi R experts,
I know how to send simple plain text message in body and how to send with
attachments. This is thanks to stackoverflow reference below.
But I don't know how to send dput() output in the body of the email (or
attachment) using sendmailR. I more interested in figuring out how to inc
Hi,
Is there a way to write a dataframe or table to the clipboard as an image? I
want to paste into an email. I use snagit or print screen to do this today but
want to know if there is a way to do this through R.
For example I know how to write to clipboard for copy and pasting into Excel:
> w
Hi,
Is anyone aware if there is a package that allows one to connect to Oracle
Business Intelligence (aka OBIEE)?
I want to be able to pull in a summary table contained in an "answer" (aka
OBIEE "query").
Dan
Lawrence Livermore National Lab
WF Analyst
[[alternative HTML version delet
esday, January 15, 2013 3:18 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] readHTMLTable (XML package)
Hi Dan,
On Tue, Jan 15, 2013 at 5:31 PM, Lopez, Dan wrote:
> Hi Ista,
>
> It does exist. It’s a page in our company intranet.
Ah, good.
>
> It is https so it lo
what is out there)
Dan
-Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: Tuesday, January 15, 2013 3:00 PM
To: Lopez, Dan
Cc: Ista Zahn; R help (r-help@r-project.org)
Subject: Re: [R] readHTMLTable (XML package)
On Jan 15, 2013, at 2:31 PM, Lopez, Dan
rror in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Thanks.
Dan
-Original Message-
From: Ista Zahn [mailto:istaz...@gmail.com]
Sent: Tuesday, Janua
Hi,
I am using XML::readHTMLTable and getting the below error. Does anyone know
why? Does this function not work with https? I didn't see anything in help
about that.
> library(XML)
> wampage<-readHTMLTable('https://hr-workforce-analytics.llnl.gov/wf_pi_pop.html',1)
Error in htmlParse(doc) :
Andrew,
That did the trick.
Thank you.
Dan
From: Andrew Robinson [mailto:mensuration...@gmail.com]
Sent: Monday, January 14, 2013 6:06 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] Random Forest Error for Factor to Character column
After you subset the data, did you
Hi,
Can someone please offer me some guidance?
I imported some data. One of the columns called "JOBTITLE" when imported was
imported as a factor column with 416 levels.
I subset the data in such a way that only 4 levels have data in "JOBTITLE" and
tried running randomForest but it complained a
Hi,
I am using the Random Forest package to classify observations into one of two
classes. My data is unbalanced with the minority class accounting for 7% of
total data set.
I have heard the 10-Fold Cross validation can help me with improving
classification. But being new at most of this it's
els(y), collapse=", "))), right=FALSE)}
> PrintLvls2(dat1)
Lvls Names
col1 92, 6, 7, 10, 15, 16, 17, 23, 24
col2 7b, c, d, e, g, h, j
col3 51, 2, 3, 4, 5
Thanks.
Dan
-Original Message-
From: Bert Gunter [mailto:gunter.ber..
Hi,
Is there a function I can use on my dataframe to give me a concise summary of
variables that are NA,blank,etc? Basically all Null values, Empty strings,
white space, blank values. Ideally it would look something like the below:
# it should only includes the fields with NAs, blanks, etc. Add
ste0(levels(y),
collapse=", "))), right=FALSE)}
Thanks again.
Dan
-Original Message-
From: David L Carlson [mailto:dcarl...@tamu.edu]
Sent: Wednesday, October 17, 2012 8:29 AM
To: 'arun'; Lopez, Dan
Cc: 'R help'
Subject: RE: [R] List of Levels for all Fac
Thanks.
Dan
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Tuesday, October 16, 2012 10:09 AM
To: Lopez, Dan
Cc: R help; Rui Barradas
Subject: Re: [R] List of Levels for all Factor variables
HI,
You can also try this:
set.seed(1)
dat1<-data.frame(col1=fac
Sent: Tuesday, October 16, 2012 11:16 AM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] Problems with xlsx and rjava
Hello,
I cannot answer directly to your question, but I had problems with package xlsx
and for what I've seen on R-Help so had others. Maybe you are using
Hi,
I keep getting the below error regarding rJava which is required by package
xlsx (I have used it in the past to directly import data from Excel 2010).
I was on R version 2.15.0 when I was getting this error this morning. So I
upgraded to 2.15.1 but still the same problem. I tried unstalling
Perfect!
Thank you!
Dan
-Original Message-
From: Rui Barradas [mailto:ruipbarra...@sapo.pt]
Sent: Tuesday, October 16, 2012 9:03 AM
To: Lopez, Dan
Cc: R. Michael Weylandt; R help (r-help@r-project.org)
Subject: Re: [R] List of Levels for all Factor variables
Hello,
The problem is with
[mailto:michael.weyla...@gmail.com]
Sent: Tuesday, October 16, 2012 8:28 AM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] List of Levels for all Factor variables
On Tue, Oct 16, 2012 at 4:19 PM, Lopez, Dan wrote:
> Hi,
>
> I want to get a clean succinct list of all levels for all
Hi,
I want to get a clean succinct list of all levels for all my factor variables.
I have a dataframe that's something like #1 below. This is just an example
subset of my data and my actual dataset has 70 variables. I know how to narrow
down my list of variables to just my factor variables by u
Hello,
I have two Random Forest (RF) related questions.
1. How do I view the classifications for the detail data of my training
data (aka trainset) that I used to build the model? I know there is an object
called predicted which I believe is a vector. To view the detail for my testset
I
Does anyone know if there are any special considerations with Random Forest and
correlated fields or rather derived fields?
For example if we are trying to predict who might leave our company to go work
for another company some of the variables we may look at are below (in addition
to others).
Hi Bert,
Thanks! These worked perfectly.
mydata<-mydata[,!(i1)]
Dan
-Original Message-
From: Bert Gunter [mailto:gunter.ber...@gene.com]
Sent: Thursday, August 30, 2012 8:54 AM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] Identifying and Removing NA Columns
Hi,
How do you subset a dataframe so that you only have columns:
1. that contain one or more NAs?
2. that contain factors with greater than or equal to 32 levels?
How do you remove from a dataframe columns**
3. with one or more NA's?
4. that contain factors with greate
Hi Ricardo,
I wonder if this is like the other site I found recently on the web:
http://www.gpsvisualizer.com/geocoder/
Thanks for sending me this resource. I will check it out.
Dan
From: Ricardo Pietrobon [mailto:rpie...@duke.edu]
Sent: Monday, August 06, 2012 10:44 PM
To: Lopez, Dan
Cc
Thank you!
Dan
From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
Sent: Thursday, August 02, 2012 5:51 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] Plotting Where People Live on a U.S. Map
Hi Dan,
For question 1, yes you'll need geographic coordinates. I think
Hi,
QUESTION TOPIC #1
I have some data I want to plot on a map. But what I have are home addresses:
street, City, State, complete postal code--i.e 95377-1234. Is there a way to
plot this data or do I need latitudinal and longitude coordinates? If so how do
I convert them? Is there a package tha
Hi Michael,
I wasn't getting how to actually use it from ?suppressPackageStartupMessages
example online.
Thank you very much.
Dan
-Original Message-
From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com]
Sent: Monday, June 18, 2012 2:53 PM
To: Lopez, Dan
Cc: R help (r-h
6] "package:rattle" "package:R.utils" "package:utils"
"package:R.oo""package:R.methodsS3"
[11] "package:methods" "Autoloads" "package:base"
Dan
From: Bert Gunter [mailto:gunter.ber...@gene.c
hods" "Autoloads" "package:base"
> 0
Thanks.
Dan
From: Bert Gunter [mailto:gunter.ber...@gene.com]
Sent: Monday, June 18, 2012 1:10 PM
To: Lopez, Dan
Cc: David Winsemius; R help (r-help@r-project.org)
Subject: Re: [R] Error w/ Start up Script
?suppressPacka
essfully loaded. See ?R.oo for help.
Attaching package: 'R.oo'
The following object(s) are masked from 'package:R.methodsS3':
throw.default
..
...
-Original Message-----
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: Monday, June 18, 2012 12:12 PM
To:
Jeff - Thanks. I think I'll just stick to using file.choose().
Dan
-Original Message-
From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us]
Sent: Monday, June 18, 2012 10:29 AM
To: Lopez, Dan; arun
Cc: R help
Subject: Re: [R] Using Sub
Please study how escapes work
?
Thanks.
Dan
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Monday, June 18, 2012 8:59 AM
To: Lopez, Dan
Cc: R help
Subject: Re: [R] Using Sub
Hi,
I guess you need something like this:
> str1<-"G:\\Compensation Audits_Reports\\Step Audit\\Steps off
I noticed about a couple weeks ago that my R start up script starting showing
the below errors, following the line "Type 'q()' to quit R"
Not sure what I did different and so far it hasn't caused major problems but
kind of fear that it will.
Can you please help?
I also posted my Rprofile below.
com]
Sent: Friday, June 15, 2012 12:04 AM
To: Lopez, Dan
Cc: R help
Subject: Re: [R] Using Sub
On 12-06-14 6:23 PM, Lopez, Dan wrote:
> Hi,
>
> I have been trying to get the sub function to work but can't for the life of
> me figure it out. I tried looking at ?sub but I think there is
Hi,
I have been trying to get the sub function to work but can't for the life of me
figure it out. I tried looking at ?sub but I think there is something that I am
just not understanding.
Example failed attempts
> sub("\\","/","G:\Compensation Audits_Reports\Step Audit\Steps off Step.accdb")
E
72 matches
Mail list logo