Surely doing
y <- 1 - x
would be the simplest way?
Best,
Tom
> -Original Message-
> From: R-help On Behalf Of Rui Barradas
> Sent: 19 May 2025 08:08
> To: paul zachos ; r-help@r-project.org
> Subject: Re: [R] Looking for a function or a set of steps
>
> Às 1
Oh and don't forget:
#first line of code, bring dplyr into memory after that package has been
installed.
library(dplyr)
On Wednesday, November 27th, 2024 at 12:05 PM, Tom Woolman
wrote:
>
>
> Check out the dplyr package, specifically the mutate function.
>
> # Cre
Check out the dplyr package, specifically the mutate function.
# Create new column based on existing column value
df <- df %>% mutate(FirstDay = if(ID = 2, 5))
df
Repeat as needed to capture all of the day/firstday combinations you want to
account for.
Like everything else in R, there are
Imagine that it's the year 2022 and you don't know how to look up
information about performing a Kruskal-Wallis H test.
It would take you longer to join the listserv and then write such a
cokamemie email than to open the stats textbook you are supposed to have
for the course, much less doing
Some ideas:
You could create a cluster model with k=3 for each of the 3 variables,
to determine what constitutes high/medium/low centroid values for each
of the 3 types of plant types. Centroid values could then be used as the
upper/lower boundary ranges for high/med/low.
Or utilize a hist
Everyone needs to speak English exactly like I do or else they're doing
it wrong
:)
By I pronounce CRAN the same way that I pronounce the first half of
cranberry.
On 2022-05-04 20:24, Avi Gross via R-help wrote:
Extended discussion may be a waste but speaking for myself, I found it
highl
Have you looked at the merge function in base R?
https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/merge
On 2022-03-19 21:15, Jeff Reichman wrote:
R-Help Community
I'm trying to combine two data.frames which each containing 10 columns
of
which they each share two common fiel
KB or
MB file size for attachments).
Thanks,
Tom
On 2022-01-13 12:25, Eric Berger wrote:
Re: constructive criticism to make this list more useful to more
people:
Suggestion 1: accommodate questions related to non-base-R packages
This has been addressed by many alrea
Greg Williams has a book titled "Data Mining with Rattle and R", which
has a chapter on association rules and the arules package. Williams'
Rattle GUI package for R also lets you define an association rules model
using a graphical interface (which creates the R code for you in the log
file for
Apologies, I left out 3 critical lines of code after the randomized
sample dataframe is created:
group_a <- d[ which(d$label =='A'), ]
group_b <- d[ which(d$label =='B'), ]
group_c <- d[ which(d$label =='C'), ]
On 2021-08-03 18:56, Tom Woolman wro
cale_x_continuous(name = "Log-scale Anomaly Score", trans="log2")
+
scale_y_continuous(trans="log2", name="Log-transformed Frequency
Counts") +
ggtitle("Transformed Anomaly Scores - Group C Only")
# Group C transformed histogram is produce
sign
of experiment and you want to perform an analysis that treats time as
qualitative data.
Quoting "N. F. Parsons" :
@Tom Okay, yeah. That might actually be an elegant solution. I will
mess around with it. Thank you - I’m not in the habit of using
factors and am no
y, Washington State University
Graduate Advocate, American Association of University Professors (OR)
Recent work
(https://www.researchgate.net/profile/Nathan_Parsons3/publications)
Schedule an appointment (https://calendly.com/nate-parsons)
On Wednesday, Jul 21, 2021 at 8:30 PM, Tom Woolman
Couldn't you convert the date columns to character type data in a data
frame, and then convert those strings to factors in a 2nd step?
The only downside I think to treating dates as factor levels is that
you might have an awful lot of factors if you have a large enough
dataset.
Quoti
ssing) classification problem. The first
challenge will be obtaining human-labeled training examples of a
sufficient number of example documents.
Thanks,
Tom
Quoting Brian Smith :
Hi,
I am wondering if there is some references on how R can be used to
analyse legal/court documents. I searched a b
In Windows versions of R/RStudio when refering to filename paths, you
need to either use two "\\" characters instead of one, OR use the
reverse slash "/" as used in Linux/Unix. It's an unfortunate conflict
between R and Windows in that a single \ character by itself is
treated as an esc
Hi Dr. Pedersen.
I haven't used cook's on an aov object but I do it all the time from
an lm (general linear model) object, ie.:
mod <- lm(data=dataframe)
cooksdistance <- cooks.distance(mod)
I *think* you might be able to simulate an aov using the lm functon by
selecting the parameter in
Thanks, everyone!
Quoting Jim Lemon :
Oops, I sent this to Tom earlier today and forgot to copy to the list:
VendorID=rep(paste0("V",1:10),each=5)
AcctID=paste0("A",sample(1:5,50,TRUE))
Data<-data.frame(VendorID,AcctID)
table(Data)
# get multiple vendors for each acc
in his "Bloom County" comic strip )
On Tue, Nov 17, 2020 at 3:29 PM Tom Woolman
wrote:
Hi Bill. Sorry to be so obtuse with the example data, I was trying
(too hard) not to share any actual values so I just created randomized
values for my example; of course I should have specified th
uot;))
?
Must each vendor have only one account? If not, what should the result be
for
Data2 <- data.frame(Vendor=c("V1","V2","V3","V1","V4","V2"),
Account=c("A1","A2","A2","A2","A3",&q
Hi everyone. I have a dataframe that is a collection of Vendor IDs
plus a bank account number for each vendor. I'm trying to find a way
to count the number of duplicate bank accounts that occur in more than
one unique Vendor_ID, and then assign the count value for each row in
the dataframe
Hi everyone.
I'd like to perform RIDIT scoring of a column that consists of ordinal
values, but I don't have a comparison dataset to use against it as
required by the Ridit::ridit function.
As a question of best practice, could I use a normally distributed
frequency distribution table gen
Hi Leslie and all.
You may want to investigate using SparklyR on a cloud environment like
AWS, where you have more packages that are designed to work on cluster
computing environments and you have more control over those types of
parallel operations.
V/r,
Tom W.
Quoting Leslie
.
Quoting Tom Woolman :
Hi everyone. I'm using the kernlab ksvm function with the rbfdot
kernel for a binary classification problem and getting a strange
result back. The predictions seem to be very accurate judging by the
training results provided by the algorithm, but I'm unable to
Hi everyone. I'm using the kernlab ksvm function with the rbfdot
kernel for a binary classification problem and getting a strange
result back. The predictions seem to be very accurate judging by the
training results provided by the algorithm, but I'm unable to generate
a confusion matrix
train[,1:29], nperm=99, ntree=500)
Thanks in advance.
Tom Woolman
PhD student, Indiana State University
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Thank you so much Duncan. I will pitch in. Tom
From: Duncan Murdoch
Sent: Sunday, May 3, 2020 2:56 PM
To: Fomby, Tom; r-help@R-project.org
Subject: Re: [R] Question about "sample" function and inconsistent results I am
getting across machines.
On
trace the version of sample() in my ASUS
computer. Me running on 3.6.3 did not fix things because of its determined
adherence to the buggy version.
Much appreciation,
Tom Fomby
Department of Economics
SMU
From: Duncan Murdoch
Sent: Sunday, May 3, 2020 2:36
using the sample function.
By the way, how is it that one can take a membership in the R community so as
to provide support for volunteers like yourself.
Thank you,
Tom Fomby
Department of Economics
SMU
Dallas, TX 75275
From: Duncan Murdoch
Sent: Sunday, M
g not
knowing which partitions of the data are being used by the student.
Thank you for considering my question.
Sincerely,
Tom Fomby
Professor of Economics
SMU
Dallas, TX 75275
tfo...@smu.edu
[[alternative HTML version deleted]]
__
R-h
I am using R with the nnet package to perform a multinomial logistic
regression on a training dataset with ~5800 training dataset records
and 45 predictor variables in that training data. Predictor variables
were chosen as a subset of all ~120 available variables based on PCA
analysis. My t
I have a data frame each with 10 variables of integer data for various
attributes about each row of data, and I need to know the highest 5
variables related to each of
row in this data frame and output that to a new data frame. In addition to
the 5 highest variable names, I also need to kn
, "name_b", "name_a", "name_c”))
my_lines <- c(name_a = "solid", name_b = "dotted", name_c = "twodash")
ggplot(my_df, aes(x = x, y = val, linetype = var)) +
geom_line() +
scale_linetype_manual(values = my_lines)
Regards,
Tom
>
unrelated regression ("SUR") specification.
However, I consider it more appropriate to estimate the cost function
via OLS and the cost share equations via TOBIT due to some peculiarities
of the data (but still as SUR).
I am looking forward to your replies!!
Warm regards,
Tom
(I have
Hello
Thank you all for most useful responses. I was looking for answers in the
wrong place, that is why I have not responded before!
Tom Backer Johnsen
> On 7 Nov 2017, at 21:25, Rui Barradas wrote:
>
> Hello,
>
> Try
>
> print(head(...))
>
> Hope this helps
Dear R-help,
I am running a Mac under Sierra, with R version 3.4.2 and RStudio 1.1.383.
When running head () or tail () on an object in a script using source (
Hello,
I have a question related to recursive partitioning, but I cannot find
an answer, likely because I don't know how to properly word my Google
search query.
All recursive partitioning examples, which I can find, are used for
either classification or regression trees like
library(tree)
ction decomposition of P/Q?
For example:
Given (3x^3+x^2-8x+6)/(x^2)(x-1)^2
Return 4/x + 6/x^2 � 1/(x-1) + 2/(x-1)^2
Thank you, Tom
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
Can someone help me with R code to perform approximations to second order
differential equations and systems of first order differential equations using
Euler's method and Runge-Kutta? I am not a student and this is not for a test
or graded assignment.
Examples (unrelated to each other):
h =
job which
would untar it into something like ./R_install/ I need to point to that
./R_install/bin/Rscript.
I am currently using R-3.2.1 so I'll try upgrading too.
Thanks,Tom
On Wednesday, October 19, 2016 3:38 AM, Martin Maechler
wrote:
>>>>> Tom Graves via
Thanks. I will give this a try. I was doing the install step and trying to
configure the relative path before.
Tom
On Wednesday, October 19, 2016 3:38 AM, Martin Maechler
wrote:
>>>>> Tom Graves via R-help
>>>>> on Tue, 18 Oct 2016 21:06:54 + wr
ried a few things but the things I had tried didn't work. Are there any
options to configure or PATHs I could use to do this?
Any help is appreciated.
Thanks,Tom
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list --
ot;))
returns the 3 rules with empty lhs.
Hello Martin,
I add you to this thread, because the arules::subset() behaviour
appears to me to be a bug in arules. And I'd like to suggest to add an
explanation/example to arules::subset() help.
Cheers,
Dirk
On 13 September 2016 at 05:10,
Hello,
subsets of association rules (with respect to support, confidence, lift, or
items) can be obtained with the arules::subset() function; e.g.
rm(list = ls(all.names = TRUE))
library(arules)
set.seed(42)
x <- lapply(X = 1:500, FUN = function(i)
sample(x = 1:10, size = sample(1:5,
Using a PC I have written the R code for my elementary statistics students.
One of the students has a Mac. Should the same lines of code work on a Mac?
Where can the student find support for R on her Mac? I don't know anything
about them, and have never used one.
Thank you.
[[al
A quick google for "ggplot2 change legend text" turns up several hits.
This stackexchange question has several recipes.
http://stats.stackexchange.com/questions/5007/how-can-i-change-the-title-o
f-a-legend-in-ggplot2
including the correct use of the labs() function;
labs(aesthetic='BrandValue in B
- wday(a1$date)
# note can’t have spaces in variable names
week_names <- wday(a1$date, label=TRUE)
*From:* Shivi Bhatia [mailto:shivipm...@gmail.com]
*Sent:* July 26, 2016 12:16 PM
*To:* Tom Wright
*Cc:* David L Carlson ; r-help
*Subject:* Re: [R] Date Time in R
Hello Tom,
Please
Hi again Shiva,
I think what we need to see is the output from:
str(eid$date)
and perhaps
head(eid$date)
If you can send this information before doing any processing on the date
(i.e. before the as.Date() function) we may be able to help.
-Original Message-
From: R-help [mailto:r-help
Not sure I can translate the format of your Date column correctly, however the
command
DF1$Date <- as.Date(DF1$Date, format=’formatstr’)
Will convert the dates into a format correctly handled by R.
?strptime
Should give you an idea of what formatstr should look like.
I.e. if
date = 160721
as.
You may like to look at
?suppressMessages
P.S. sorry for posting in HTML, new laptop and it’s next on my list of things
to fix.
From: Ivan Calandra
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE a
Default level = 0.95.
Does this mean +/- 0.025 from estimate?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Dear William,
The line of code you composed works perfectly, as you knew it would. Thank you
for your kind response. I will now endeavor to forget that other function
exists.
Sincerely, Tom
From: William Dunlap [wdun...@tibco.com]
Sent: Monday, July 18
do want to develop better form. So, I'll keep working on it.
Thank you for your kind response and examples. I will study them.
Sincerely, Tom
From: jim holtman [jholt...@gmail.com]
Sent: Sunday, July 17, 2016 7:14 PM
To: Jianling Fan
Cc: Tom Mosca;
3.0
10 2015 1 1 9 272 8.8 9.6 1025.4 3.2 -3.3 �
The first four columns are year, month, day, hour (0 � 23). I wish to take the
means of the next six columns (WDIR, WSPD, GST, PRES, ATMP and DEWP) by year,
month and day. That is, I want daily averages.
Please help. Thank you.
Solved it myself:
aggregate(mydata, by=mydata[c("MM","DD")], FUN=mean)
Thank you.
# -
My dataframe looks like this:
> mydata
X.YY MM DD hh WDI R.WSP D.GST PRES ATMP DEWP
12015 1 1 0 328 3.6 4.5 102
I'm no expert here but I have recently been playing with the package
'geosphere' it contains plenty of options to calculate distance
between two coordinates specified as lat and long.
install.packages('geosphere') # only needed once
library(geosphere)
coord1 <- c(43.60923,-79.322799)
coord2 <- c(
Does this do what you want?
as.numeric(with(ds_example,paste(1,year2013,year2014,year2015,sep='')))
On Thu, Jun 16, 2016 at 8:57 AM, wrote:
> Hi All,
>
> I need to build a binary vector made of a set of dichotomous variables.
>
> What I have so far is:
>
> -- cut --
>
> ds_example <-
> struct
As you probably already guessed we are going to need to see the
contents of nref, mu.m2 and disp.m2 to help.
dput(nref)
dput(mu.m2)
dput(disp.m2)
k might help too.
On Tue, Jun 14, 2016 at 2:06 PM, JI Cho wrote:
> Dear R users,
>
> I have been using rnorm, rbinom and have been getting the followi
No expert here, and this isn't tested. It seems you can set the
forbid.reuse option which will cause curl to shutdown the connection
after transfer is complete.
if(url.exists("http://www.omegahat.net/RCurl/index.html";)) {
curl <- getCurlHandle()
curlSetOpt(.opts=list(forbid.reuse=1),curl=cu
Did you install the package before loading it?
install.packages("VIM")
On Thu, Jun 9, 2016 at 1:19 PM, Ayyappa Chaturvedula
wrote:
> Dear R users,
> I am trying to use VIM (Visualization and Imputation of Missing Values)
> package in R. When I try to install the VIM library (library(VIM)), I am
Assuming you are on a mac this link may be of assistance:
http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/
On Wed, Jun 8, 2016 at 7:14 PM, David Howell wrote:
> I am having trouble running aplpack on my Mac. It
My general approach to this is to put the function for loading data
into a separate file which is then sourced in the main analysis file.
Occasionally I'll use a construct like:
if file.exists("loadData_local.R")
{
source("loadData_local.R")
}else{
source("loadData_generic.R")
}
Whe
Hi Óscar,
Not really sure what you mean by the time variable being a "character"
vector. Unless you are plotting a barchart or boxplot (or similar), I
don't this this makes sense. If you can post a sample of your data,
preferably using the dput() command we can probably help more.
On Thu, May 26,
It may not be the problem, but with RStudio this error pops up when
the area reserved for plotting is too small. Typically this area is in
the right hand column, if you have this minimised (perhaps to maximise
space for typing) you will hit this problem. Try making it bigger.
Edit: Just ran your c
Don't see that as being a big problem. If your data grows then dplyr
supports connections to external databases. Alternately if you just want a
mean, most databases can do that directly in SQL.
On Tue, May 24, 2016 at 4:17 PM, Matthew
wrote:
> Thank you very much, Tom.
> This gets
Using dplyr
$ library(dplyr)
$ x<-data.frame(Length=c(321,350,340,180,198),
ID=c(rep('A234',3),'B123','B225') )
$ x %>% group_by(ID) %>% summarise(m=mean(Length))
On Tue, May 24, 2016 at 3:46 PM, Matthew
wrote:
> I have a data frame with 10 columns.
> In the last colum
I just tested your code on my debian install with no problems. RStudio
server logs messages to /var/log/messages (on redhat). Does running:
$ cat /var/log/messages |grep rsession
$ cat /var/log/messages |grep rserver
in the shell give any clues?
R version 3.2.5 (2016-04-14)
Platform: x86_64-p
setInternet2() first thing after launching R might fix that.
> On May 12, 2016, at 07:45, Alba Pompeo wrote:
>
> Hello.
>
> I've tried to run R, but I receive many warnings and can't do simple
> stuff such as installing packages.
>
> Here's the full log when I run it.
>
> http://pastebin.com
As pointed out somewhere in the replies to this you can always use the
exists() function.
for(i in 1:5){
if(exists(output)){
output <- c(output, i )
}else{
output <- i
}
}
On Wed, Apr 27, 2016, 11:15 AM Gordon, Fabiana <
fabiana.gor...@imperial.ac.uk> wrote:
> Hello,
>
>
o change this
behaviour.
On Mon, May 2, 2016 at 11:01 AM, wrote:
> I just changed all the names in Command to lowercase, then this
> str_extract works fine for "pd" and "t2", but not for "PDT2". Do you have
> any idea how I can bring PDT2 also in str_ext
PDT2')// I create a vector with these conditions
> str_extract(df$Command,paste(v1,collaps='|')) //returning patterns,
> using stringr library
>
> here I see no pattern named PDT2 but there are only PD and t2 patterns.
> On Monday, May 2, 2016 8:18 AM, Tom Wright wro
e size is not 0. It seems that this AND does not work.
>
>
> On Monday, May 2, 2016 5:05 AM, peter dalgaard wrote:
>
> On 02 May 2016, at 12:43 , ch.elahe via R-help
> wrote:
>
> > Thanks for your reply tom. After using
> Subset(df,grepl("(.*t2.*pd.*)|(.*pd.*t2.*)"
If you can address your columns by name then order shouldn't matter. If the
column order does matter, perhaps a matrix is a better structure to use?
On Sun, May 1, 2016, 10:56 AM Jan Kacaba wrote:
> Hello dear R users,
>
> Is there a function or package which can insert row, column or array in
>
I think what you ask isn't ideal.Each column in a dataframe should be the
same data type. While column names are stored in the first row when the df
is exported to CSV, they are not stored as columns in the data frame.
Instead the column names are stored as a separate attribute of the df. This
is w
$Command)
On Sat, Apr 30, 2016, 7:07 PM Tom Wright wrote:
> subset(df,grepl("t2|pd",x$Command))
>
>
> On Sat, Apr 30, 2016 at 2:38 PM, ch.elahe via R-help > wrote:
>
>> Hi all,
>>
>> I have one factor variable in my df and I want to extract the names
subset(df,grepl("t2|pd",x$Command))
On Sat, Apr 30, 2016 at 2:38 PM, ch.elahe via R-help
wrote:
> Hi all,
>
> I have one factor variable in my df and I want to extract the names from
> it which contain both "t2" and "pd":
>
> 'data.frame': 36919 obs. of 162 variables
>$TE:
Never let it be said there's only one way to do a thing:
require(ggplot2)
require(dplyr)
#create a sample dataset
dat <- data.frame(y1=sample(c(1:10,NA),20,replace=TRUE),
y2=sample(c(1:10,NA),20,replace=TRUE),
y3=sample(c(1:10,NA),20,replace=TRU
On heroku the database uri is stored in an environment variable.
> db_uri = Sys.getenv(''DATABASE_URL')
I'm not sure if you can use that directly or if you will need to parse
it for username, password etc.
On Thu, 2016-04-21 at 16:49 +0100, Izaak Rogan wrote:
> Hi,
>
> I'm having trouble connec
Assuming your dataframe is in a variable x:
> require(dplyr)
> x %>% group_by(ID) %>% summarise(maxVal = max(Value,na.rm=TRUE))
On Fri, 2016-04-22 at 13:51 +, Saba Sehrish via R-help wrote:
> Hi
>
>
> I have two columns in data frame. First column is based on "ID" assigned to
> each grou
I don't have my debian box available so can't confirm. But I would try
$apt-get install libpng
On Tue, Apr 19, 2016 at 11:23 AM, Lorenzo Isella
wrote:
> Dear All,
> I have never had this problem before. I run debian testing on my box
> and I have recently update my R environment.
> Now, see what
to do is generate a table containing mean, median,
mode, standard deviation, min, max and count, all per column.
Thank you, Tom
Example data
Dat1 Dat2 Dat3
1154
2779
3335
42 NA 5
59 NA NA
[[alternative HTML version deleted
On Fri, 2015-09-11 at 07:48 -0700, massmatics wrote:
> AM.warpbreaks<=30
The above command is not returning what you expected, what part of the
AM.warpbreaks dataframe is expected to be <= 30?
Effectively you are using a two stage process.
1) Create a logical vector identifying rows in the datafr
I am working in China for a month and needed to download an earlier version of
R in order to use Deseq2 and its requirements. The download got to the last few
seconds and hung up. A trojan was found. It could be coincidence that it
happened when I was downloading R, or perhaps a man in the mi
message:
In open.connection(con, "r") : cannot open: HTTP status was '0 (nil)'
I do not seem to be able to get past this issue, though am able to load the
mh1823 POD package successfully from local zip file
Regards,
Tom
Tom Knox
NDE Subject Matter Expert
Upstream Engineering
'm building anything for end-of-lifed
Fedora releases, though I understand your predicament.
That said, I am still building for EL5, which is older than Fedora 17,
so you could try to rebuild the R src.rpm from koji. If it does not work
properly, let me know, and I will try to
I just landed in Paris, and haven't read backwards in this thread, but I've
done 3.2.0 builds for all current Fedora releases, they're all in
updates-testing (I think the Fedora 22 builds are in updates stable now).
The thing that changed is that R doesn't bundle a number of libraries like it
u
table(unique(df)$PROJECT)
On Tue, 2015-03-31 at 14:51 -0500, Walter Anderson wrote:
> I have a data frame that shows all of the parks (including duplicates)
> that are impacted by a projects 'footprint':
>
> PROJECT PARKNAME
> A PRK A
> A PRK B
> A PRK A
> B PRK C
> B
Not entirely sure I understand your problem here (your first email was a
lot of reading).
Would it make sense to add an extra column device_name
Thus ending up with something like:
Host Device Type
host_Aada0ssd
host_Aada1ssd
host_Aada2hdd
...
host_Nda3 ssd
Nice clean-up!!!
On Tue, 2015-03-31 at 14:19 -0400, Ista Zahn wrote:
> library(tidyr)
> library(dplyr)
> bw <- gather(bw, key = "tmp", value = "value",
> matches("^d[a-z]+[0-9]+"))
> bw <- separate(bw, tmp, c("disc", "var"), "_", extra = "merge")
> bw <- spread(bw, var, value)
___
samples<-sample(c(rep(1,10),rep(2,10),rep(3,10)),30)
samples[samples==1]<-1001:1010
samples[samples==2]<-2001:2010
samples[samples==3]<-3001:3010
fullDf<-rbind(df1,df2,df3)
fullDf[sort(order(samples),index.return=TRUE)$ix,]
On Tue, 2015-03-31 at 13:05 -0400, Kevin E. Thorpe wrote:
> Hello.
>
>
First you need to make the data pbc available, perhaps by:
data(pbc, package="survival")
Then the line:
sf2<-summary(...
looks wrong, usually you would use the summary() function to look at the
output from a function, seems to me you are missing the function here. I
have no idea what this functi
I think you need to use a loop to iterate through each of the items in
getlinks
for(link in getlinks)
{
url<-paste0('http://spec.org/jEnterprise2010/results/',link)
output<-readfiles(url)
}
You're probably also going to need to add some error handling when your
sea
I can answer this:
sample(c(0,1),1)
On Fri, 2015-03-06 at 15:04 +0530, Namratha K wrote:
> Dear Sir/Madam,
> I am a student pursuing MCA .As i am doing an project using R language .I
> want to implement A/B testing using R language.I am searching in google
> from past few days and not able to imp
plot(density(as.numeric(dd)),
axes=FALSE,
xlim=c(as.numeric(as.Date("2014-01-01")),
as.numeric(as.Date("2014-12-30")))
rug(as.numeric(dd))
axis(side=1,
at=seq(from=as.numeric(as.Date('2014-01-01')),
to=as.numeric(as.Date('2014-12-1')),length.out=12),
lab
If all you want is to add a row of na's could you just do something
like:
nExpectedRows<-length(unique(animals)) * length(unique(animalYears)) * 2
newDf<-data.frame(animals=rep(NA,nExpectedRows-nrow(comAn)),
animalYears=rep(NA,nExpectedRows-nrow(comAn)),
animal
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Tom Wright
> Sent: Wednesday, February 4, 2015 2:08 PM
> To: Rui Barradas
> Cc: r-h...@stat.math.ethz.ch
> Subject: Re: [R] Still trying to avoid loops
>
> Thanks, I was not aware of
; S D visit
> 1 a 5 1
> 2 a 1 2
> 3 b 3 1
> 4 c 2 1
> 5 c 3 2
> 6 c 4 3
>
>
>
>
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
> Tell me what you want to do, not how you want to do it.
&
>
> > Aren't the levels of your example wrong? If the levels are
> > levels=c('a','b','c'), not c('b', 'a', 'c'), then the following will do the
> > job.
> >
> > unname(unlist(tapply(dat$D, dat$S, or
,'b','c'), not c('b', 'a', 'c'), then the following will do
> the job.
>
> unname(unlist(tapply(dat$D, dat$S, order)))
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 04-02-2015 19:34, Tom Wright escreveu:
> > G
For the introduction to R I strongly suggest you look at the materials
published by software-carpentry www.software-carpentry.org. The lessons
are all open-source, hosted on github and are under active development.
On Tue, 2015-02-03 at 12:08 +0100, Michael Haenlein wrote:
> Dear all,
>
> I am Pr
1 - 100 of 621 matches
Mail list logo