Hi,
using the library "stringi" allows this:
> unlist(stringr::str_split(x, "\n"))
[1] "abc" "def" """ghi"
Best,
Kimmo
ke, 2025-02-05 kello 09:35 -0500, Duncan Murdoch kirjoitti:
> Thanks to Rui, Peter and Tanvir! Peter's seems to be the fastest of
> the
> 3 suggestions so far on the littl
On 2025-02-05 5:20 p.m., Rolf Turner wrote:
On Wed, 5 Feb 2025 08:44:12 -0500
Duncan Murdoch wrote:
If I have this object:
x <- c("abc\ndef", "", "ghi")
and I write it to a file using `writeLines(x, "test.txt")`, my text
editor sees a 5 line file:
1: abc
2: def
3:
4: gh
Hello,
Inline.
Às 20:27 de 05/02/2025, peter dalgaard escreveu:
A 3rd option could be
scan(text=x, what="", blank.lines.skip=FALSE)
(all because readLines() doesn't obey the text=x convention, perhaps it should?
I'm unsure whether the textConnection is left open in Rui's method.)
No, it is
On Wed, 5 Feb 2025 08:44:12 -0500
Duncan Murdoch wrote:
> If I have this object:
>
>x <- c("abc\ndef", "", "ghi")
>
> and I write it to a file using `writeLines(x, "test.txt")`, my text
> editor sees a 5 line file:
>
>1: abc
>2: def
>3:
>4: ghi
>5:
>
> which is what
A 3rd option could be
scan(text=x, what="", blank.lines.skip=FALSE)
(all because readLines() doesn't obey the text=x convention, perhaps it should?
I'm unsure whether the textConnection is left open in Rui's method.)
-pd
> On 5 Feb 2025, at 15:35 , Duncan Murdoch wrote:
>
> Thanks to Rui, Pe
Thanks to Rui, Peter and Tanvir! Peter's seems to be the fastest of the
3 suggestions so far on the little test case, but on the real data
(where x contains several thousand lines), Rui's seems best.
Duncan
On 2025-02-05 9:13 a.m., peter dalgaard wrote:
This also seems to work:
strsplit(pa
x <- c("abc\ndef", "", "ghi")
unlist(strsplit(gsub("^$", "\n", x), "\n"))
or
x %>%
gsub("^$", "\n", .) %>%
strsplit("\n") %>%
unlist()
Regards.
Tanvir Ahamed
Stockholm, Sweden | mashra...@yahoo.com
On Wednesday, February 5, 2025 at 02:44:37 PM GMT+1, Duncan Murdoch
This also seems to work:
> strsplit(paste(x,collapse="\n"),"\n")[[1]]
[1] "abc" "def" """ghi"
> On 5 Feb 2025, at 14:44 , Duncan Murdoch wrote:
>
> If I have this object:
>
> x <- c("abc\ndef", "", "ghi")
>
> and I write it to a file using `writeLines(x, "test.txt")`, my text editor
>
Às 13:44 de 05/02/2025, Duncan Murdoch escreveu:
If I have this object:
x <- c("abc\ndef", "", "ghi")
and I write it to a file using `writeLines(x, "test.txt")`, my text
editor sees a 5 line file:
1: abc
2: def
3:
4: ghi
5:
which is what I'd expect: the last line in the e
If I have this object:
x <- c("abc\ndef", "", "ghi")
and I write it to a file using `writeLines(x, "test.txt")`, my text
editor sees a 5 line file:
1: abc
2: def
3:
4: ghi
5:
which is what I'd expect: the last line in the editor is empty. If I
use `readLines("test.txt")` on th
On Fri, Mar 4, 2022 at 8:07 AM Ranjan Maitra wrote:
>
> > I am in need of generating artificial data for machine learning
> > classification and regression analysis. What I am looking for is
> > something similar to Python sklearn.datasets.make_classification and
> > sklearn.datasets.make_regressi
Dear All,
I am in need of generating artificial data for machine learning
classification and regression analysis. What I am looking for is
something similar to Python sklearn.datasets.make_classification and
sklearn.datasets.make_regression:
https://scikit-learn.org/stable/modules/generated/sklea
Thank you so much!
Have a nice day!
With best regards,
On Mon, Jul 1, 2019 at 11:16 AM Jeff Newmiller
wrote:
> Or https://cran.r-project.org/web/views/NaturalLanguageProcessing.html
>
> On June 30, 2019 11:13:10 PM PDT, Richard O'Keefe
> wrote:
> >Are you aware of https://www.tidytextmining.com
Thank you so much!
Have a nice day!
With best regards,
On Mon, Jul 1, 2019 at 10:43 AM Richard O'Keefe wrote:
> Are you aware of https://www.tidytextmining.com/
>
> On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah
> wrote:
>
>> Thank you!!
>> Have a nice day!
>> With best regards,
>>
>> On Mon, Jul 1
Or https://cran.r-project.org/web/views/NaturalLanguageProcessing.html
On June 30, 2019 11:13:10 PM PDT, Richard O'Keefe wrote:
>Are you aware of https://www.tidytextmining.com/
>
>On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah
>wrote:
>
>> Thank you!!
>> Have a nice day!
>> With best regards,
>>
>>
Are you aware of https://www.tidytextmining.com/
On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah wrote:
> Thank you!!
> Have a nice day!
> With best regards,
>
> On Mon, Jul 1, 2019 at 6:57 AM Abby Spurdle wrote:
>
> >
> > > In parts of these reports, people may state their
> > > reasons for do not
Thank you!!
Have a nice day!
With best regards,
On Mon, Jul 1, 2019 at 6:57 AM Abby Spurdle wrote:
>
> > In parts of these reports, people may state their
> > reasons for do not using such system. Is it possible to use R to only
> > extract such reasons from all reports?
>
> Are the reports in p
> In parts of these reports, people may state their
> reasons for do not using such system. Is it possible to use R to only
> extract such reasons from all reports?
Are the reports in plain text format?
Are there specific key words to search for?
Are the reports in a certain order?
If so, this mak
Hi,
I hope you are doing well!
I have a question about R, could you please answer it?
Please consider that we have some reports (for example 100 reports) which
people presented their experience about use of a particular system. These
reports are unstructured. In parts of these reports, people may
Good suggestion, and for my purposes, will solve the problem. Thanks!
On 3/18/2019 12:37 PM, Ben Tupper wrote:
> Hi,
>
> Might you replaced 'T' with a numeric value that signals the TRUE case
> without rumpling your matrix? 0 might be a good choice as it is never an
> index for a 1-based indexi
Hi,
Might you replaced 'T' with a numeric value that signals the TRUE case without
rumpling your matrix? 0 might be a good choice as it is never an index for a
1-based indexing system.
hold=apply(test,1,which.max)
hold[apply(test,1,isUnique)==FALSE] <- 0
hold
[1] 1 2 0
> On Mar 17, 2019, a
Solved --
hold=apply(test,1,which.max)
hold[apply(test,1,isUnique)==FALSE] <- 'T'
Now, all I need to do is figure out how to get <- 'T' from turning
everything in the matrix to a string.
On 3/17/2019 8:00 PM, Evan Cooch wrote:
Got relatively close - below:
On 3/17/2019 7:39 PM, Evan Co
Got relatively close - below:
On 3/17/2019 7:39 PM, Evan Cooch wrote:
Suppose I have the following sort of structure:
test <- matrix(c(2,1,1,2,2,2),3,2,byrow=T)
What I need to be able to do is (i) find the maximum value for each
row, (ii) find the column containing the max, but (iii) if the m
Suppose I have the following sort of structure:
test <- matrix(c(2,1,1,2,2,2),3,2,byrow=T)
What I need to be able to do is (i) find the maximum value for each row,
(ii) find the column containing the max, but (iii) if the maximum value
is a tie (in this case, all numbers of the row are the sam
The isChar function used in Parse is:
isChar <- function(e, ch) identical(e, as.symbol(ch))
On Fri, Aug 24, 2018 at 10:06 PM Gabor Grothendieck
wrote:
>
> Also here is a solution that uses formula processing rather than
> string processing.
> No packages are used.
>
> Parse <- function(e) {
>
Also here is a solution that uses formula processing rather than
string processing.
No packages are used.
Parse <- function(e) {
if (length(e) == 1) {
if (is.numeric(e)) return(e)
else setNames(1, as.character(e))
} else {
if (isChar(e[[1]], "*")) {
x1 <- Recall(e[[2]])
Some string manipulation can convert the formula to a named vector such as
the one shown at the end of your post.
library(gsubfn)
# input
fo <- y ~ 2 - 1.1 * x1 + x3 - x1:x3 + 0.2 * x2:x2
pat <- "([+-])? *(\\d\\S*)? *\\*? *([[:alpha:]]\\S*)?"
ch <- format(fo[[3]])
m <- matrix(strapplyc(ch, pat)[
lsciences.mcmaster.ca/jfox/
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Paul
> Johnson
> Sent: Tuesday, August 21, 2018 6:46 PM
> To: R-help
> Subject: [R] looking for formula parser that allows coefficients
>
> Can
Can you point me at any packages that allow users to write a
formula with coefficients?
I want to write a data simulator that has a matrix X with lots
of columns, and then users can generate predictive models
by entering a formula that uses some of the variables, allowing
interactions, like
y ~ 2
Jeff:
It does what I want.
Thanks.
Bruce
Bruce Ratner, Ph.D.
The Significant Statistician™
(516) 791-3544
Statistical Predictive Analtyics -- www.DMSTAT1.com
Machine-Learning Data Mining and Modeling -- www.GenIQ.net
Jeff Newmiller wrote:
Response5x <- Response[ rep ( seq_along( Response[[1
ata/DecileTable.html", : object 'DECILE_TABLE' not found
R>
Bruce Ratner, Ph.D.
The Significant Statistician™
(516) 791-3544
Statistical Predictive Analtyics -- www.DMSTAT1.com
Machine-Learning Data Mining and Modeling -- www.GenIQ.net
David L Carlson wrote:
I've att
TABLE' not found R> R> R>
>> print.xtable(DECILE_TABLE,
>> type="html",file="C:/R_Data/DecileTable.html",
>include.rownames=FALSE)
>> Error in print.xtable(DECILE_TABLE, type = "html", file =
>> "C:/R_Data/DecileTable.h
CILE_TABLE, type="html",file="C:/R_Data/DecileTable.html",
>> include.rownames=FALSE) Error in print.xtable(DECILE_TABLE, type = "html",
>> file = "C:/R_Data/DecileTable.html", : object 'DECILE_TABLE' not found
>>
>> R>
&
BLE'
not found
R>
Bruce Ratner, Ph.D.
The Significant Statistician™
(516) 791-3544
Statistical Predictive Analtyics -- www.DMSTAT1.com
Machine-Learning Data Mining and Modeling -- www.GenIQ.net
David L Carlson wrote:
I've attached a modification of your script file (called
'DECILE_TABLE' not found
R>
Bruce Ratner, Ph.D.
The Significant Statistician™
(516) 791-3544
Statistical Predictive Analtyics -- www.DMSTAT1.com
Machine-Learning Data Mining and Modeling -- www.GenIQ.net
David L Carlson wrote:
I've attached a modification of your script file
ant Statistician™
(516) 791-3544
Statistical Predictive Analtyics -- www.DMSTAT1.com
Machine-Learning Data Mining and Modeling -- www.GenIQ.net
David L Carlson wrote:
I've attached a modification of your script file (called .txt so it doesn't get
stripped). See if this does what you want
roject.org
Subject: Re: [R] Looking for a package to replace xtable
David:
Correction: I do need a data frame because from the order Response column I
create a data frame as per all my calculated columns, yielding the five column
decile table.
I used your latest corrections but something buggy is
random values and then order the
>> first by the second. But rbinom() is selecting random values so what is the
>> purpose of randomizing random values? If the real data consist of a vector
>> of 1's and 0's and those need to be randomized, sample(data) will do it for
>
e real data consist of a vector of
> 1's and 0's and those need to be randomized, sample(data) will do it for you.
>
> Then those numbers are replicated 10 times. Why not just select 500 values
> using rbinom() initially?
>
>
> David C
>
>
> -----Origi
7 1:22 PM
To: David L Carlson ; r-help@r-project.org
Subject: Re: [R] Looking for a package to replace xtable
David:
I tried somethings and got a little more working.
Now, I am struck at last line provided: "dec_mean<-
aggregate(Response ~ decc, dd, mean)"
Any help is appreciated.
B
anges and save the file. If you have Microsoft Excel and Word,
another fallback solution is to read the .html file into Excel where
you have a wide variety of styles.
David C
-Original Message-
From: BR_email [mailto:b...@dmstat1.com]
Sent: Thursday, April 20, 2017 4:31 PM
To: David L Ca
pen the .html file into
>> a WYSIWIG html editor such as BlueGriffon, make the changes and save the
>> file. If you have Microsoft Excel and Word, another fallback solution is to
>> read the .html file into Excel where you have a wide variety of styles.
>>
>> David C
&
017 4:31 PM
To: David L Carlson ; r-help@r-project.org
Subject: Re: [R] Looking for a package to replace xtable
David:
All is perfect, almost - after I ran your corrections.
Is there a way I can have more control of the column names, i.e.,
not be restricted to abbreviations headings, and center
riginal Message-
> From: BR_email [mailto:b...@dmstat1.com]
> Sent: Thursday, April 20, 2017 4:31 PM
> To: David L Carlson ; r-help@r-project.org
> Subject: Re: [R] Looking for a package to replace xtable
>
> David:
> All is perfect, almost - after I ran your corrections.
> Is
lto:b...@dmstat1.com]
Sent: Thursday, April 20, 2017 4:31 PM
To: David L Carlson ; r-help@r-project.org
Subject: Re: [R] Looking for a package to replace xtable
David:
All is perfect, almost - after I ran your corrections.
Is there a way I can have more control of the column names, i.e.,
not be restrict
Thanks, Jeff.
Bruce
__
Bruce Ratner PhD
The Significant Statistician™
(516) 791-3544
Statistical Predictive Analytics -- www.DMSTAT1.com
Machine-Learning Data Mining -- www.GenIQ.net
> On Apr 20, 2017, at 7:15 PM, Jeff Newmiller wrote:
>
> ReportR package
___
clear where Cum_R and Cum_n are coming from. In
>your code cum_R = Cum_R and cum_n = Cum_n so you could also use
>>
>> Cum_RespRate <- cum_R/cum_n)*100
>>
>> -
>> David L Carlson
>> Department of Anthropology
&g
use
Cum_RespRate <- cum_R/cum_n)*100
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of BR_email
Sent: Thursday, April 20, 2017 12:10 PM
To: r-he
arlson
> Department of Anthropology
> Texas A&M University
> College Station, TX 77840-4352
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of BR_email
> Sent: Thursday, April 20, 2017 12:10 PM
> To: r-help@r-project.org
&g
l
Sent: Thursday, April 20, 2017 12:10 PM
To: r-help@r-project.org
Subject: [R] Looking for a package to replace xtable
R-helper:
Below, code for generating a decile table.
I am using the xtable package, but it is not quite right for the output.
Issue #1. xtable inserts an unwanted column, before the f
Duncan: Thanks. I've exhausted my search for a simple table package that also
allows for column sums. If you are not familiar with the decile table, you will
find it quite embedded with much insight for predominance of virtually any
model.
Regards,
Bruce
__
Bruce Ratner PhD
The Sig
On 20/04/2017 1:09 PM, BR_email wrote:
R-helper:
Below, code for generating a decile table.
I am using the xtable package, but it is not quite right for the output.
Issue #1. xtable inserts an unwanted column, before the first derived
column DECILE
Issue #2. In the last line "Total" I manually su
R-helper:
Below, code for generating a decile table.
I am using the xtable package, but it is not quite right for the output.
Issue #1. xtable inserts an unwanted column, before the first derived
column DECILE
Issue #2. In the last line "Total" I manually sum all columns, even
though I only want
Details matter!
1. Are the points of discontinuity known? This is critical.
2. Can we assume monotonic increasing, as is shown?
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bl
Dear all,
For a piecewise function F similar to the attached graph, I would like to
find
inf{x| F(x) >=0}.
I tried to uniroot. It does not seem to work. Any suggestions?
Thank you very much!!
Hanna
F.pdf
Description: Adobe PDF document
___
Hi,
I am looking for the teratology data set from the Chen and Kodell (JASA 1989)
on mice exposed to different doses of a chemical, DEHP. This was also analyzed
in a Biometrics 2000 paper by Louise Ryan using GEE. I think this data set is
publicly available, but I am unable to locate it. Does
> identical(as.list(x), xz)
[1] TRUE
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Oct 26, 2015 at 6:31 PM, Erin Hodgess wrote:
> Hello!
>
> The following (which is a toy example) works fine, but I wonder if there is
> a better or more elegant way than to do the loop:
>
> xz <- vector("l
t,
> John
>
> -
> John Fox, Professor
> McMaster University
> Hamilton, Ontario
> Canada L8S 4M4
> Web: socserv.mcmaster.ca/jfox
>
>
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of
t; From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erin
> Hodgess
> Sent: October 26, 2015 9:32 PM
> To: R help
> Subject: [R] Looking for a more elegant solution than a loop
>
> Hello!
>
> The following (which is a toy example) works fine, but I wonder if there
Hello!
The following (which is a toy example) works fine, but I wonder if there is
a better or more elegant way than to do the loop:
xz <- vector("list",length=4)
x <- 6:9
for(i in 1:4)xz[[i]] <- x[i]
xz
[[1]]
[1] 6
[[2]]
[1] 7
[[3]]
[1] 8
[[4]]
[1] 9
This does exactly what I want, but th
On Sep 15, 2015, at 12:09 PM, Huot, Matthieu wrote:
> Hi Tom
>
> I know the post is over 7-8 years old but I am having the same question. How
> to do a post-hoc test like TukeyHSD on coxph type output.
Create a new variable using the `interaction`-function, apply you contrasts to
that object,
Hi Tom
I know the post is over 7-8 years old but I am having the same question. How to
do a post-hoc test like TukeyHSD on coxph type output.
Have you received any info in this matter?
Thanks
Matthieu
Looking for Post-hoc tests (a la TukeyHSD) or interaction-level independent
contrasts for sur
or
> something?
> John Kane
> Kingston ON Canada
>
>
>> -Original Message-
>> From: c_c_ribe...@hotmail.com
>> Sent: Sat, 23 May 2015 17:13:15 +0200
>> To: r-help@r-project.org
>> Subject: [R] Looking for help finding a wrapper/package to use TA-L
Terribly uninformative web-site but it does give us some idea. Thanks
John Kane
Kingston ON Canada
> -Original Message-
> From: c_c_ribe...@hotmail.com
> Sent: Sat, 23 May 2015 19:50:26 +0200
> To: jrkrid...@inbox.com
> Subject: Re: [R] Looking for help finding a wrapper
t; To: r-help@r-project.org
> Subject: [R] Looking for help finding a wrapper/package to use TA-Lib in
> R
>
> Dear members,
>
> We all know the power and usefulness of TA-Lib. There is a python wrapper
> for it but, despite all my searching, I am unable to find it for R. Do
Dear members,
We all know the power and usefulness of TA-Lib. There is a python wrapper for
it but, despite all my searching, I am unable to find it for R. Does anyone
know why? I am starting learning and using RStudio and would really like to be
able to call the TA-Lib functions from RStudio.
As the Wikipedia page you took your example problem from explains, the sets
cover problem can be formulated as an integer linear programming problem.
In R, such problems will be solved effectively applying one of the available
MILP packages, for example LPsolve or Rsymphony.
Kumar Mainali gmail.
I am looking for an R package that solves Set Cover Problem. As Wikipedia
explains:
Given a set of elements [image: \{1,2,...,m\}] (called the universe) and a
set [image: S] of [image: n] sets whose union equals the universe, the set
cover problem is to identify the smallest subset of [image: S] w
On 25/10/2014, 5:25 AM, Wush Wu wrote:
> Dear all,
>
> Sorry that I am not sure that whether I should ask the question here or
> R-devel. Is there any existed packages which implements or is implementing
> feature hashing or similar function?
>
> For who does not know "feature hashing", please le
Dear all,
Sorry that I am not sure that whether I should ask the question here or
R-devel. Is there any existed packages which implements or is implementing
feature hashing or similar function?
For who does not know "feature hashing", please let me give a brief
explanation here.
Feature hashing
Although there is a great deal of value to be gained by understanding how
"package" code is written, most of my R "projects" consist of a file with
10-100 lines of code working with data in the global environment that call on
packages. Such code is not typically posted online.
I do find it conv
Please read the posting guide (there is a link at the bottom of every
post) and post in plain text, not HTML, and also avoid all caps.
The biggest repository of R code is probably CRAN which is linked from
the main R page. There are also R-forge and Bioconductor and many R
packages on Github.
On
Dear Group,
I am bit new in R. I am looking for a code repository of few projects
developed in R.
I want to see them to learn more.
If any one of the esteemed members of the group may kindly help.
Regards,
Subhabrata Banerjee.
[[alternative HTML version deleted]]
__
Dear all,
I am looking for a consultant who can help me to solve a mathematical/
statistical problem I have. The problem is more conceptual in nature (How
to solve a given problem analytically) than programming-related. Although I
also would need some programming support later, once the analytic s
t 2013 21:03:00 +0200
From: Berend Hasselman
To: Ken Takagi
Cc:r-h...@stat.math.ethz.ch
Subject: Re: [R] Looking for package to solve for exponent using
newton'smethod
Message-ID:
Content-Type: text/plain; charset="us-ascii"
On 10-10-2013, at 20:39, Ken Takagi wrote:
?uniroot
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engine
Thanks! That's just what I needed.
__
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, reproducibl
On 10-10-2013, at 20:39, Ken Takagi wrote:
> Hi,
> I'm looking for an R function/package that will let me solve problems of the
> type:
>
> 13 = 2^x + 3^x.
>
> The answer to this example is x = 2, but I'm looking for solutions when x
> isn't so easily determined. Looking around, it seems that
On 10/10/2013 2:39 PM, Ken Takagi wrote:
Hi,
I'm looking for an R function/package that will let me solve problems of the
type:
13 = 2^x + 3^x.
The answer to this example is x = 2, but I'm looking for solutions when x
isn't so easily determined. Looking around, it seems that there is no
algebra
Hi,
I'm looking for an R function/package that will let me solve problems of the
type:
13 = 2^x + 3^x.
The answer to this example is x = 2, but I'm looking for solutions when x
isn't so easily determined. Looking around, it seems that there is no
algebraic solution for x, unless I'm mistaken. Do
On Sep 13, 2013, at 11:59 AM, Ryung Kim wrote:
> Dear R community,
>
> Please let me know if there is an R data set with time to multiple outcomes
> (unordered failure events of different types).
>
> I am specifically looking for non-competing risks so that I can have observed
> times for bot
Dear R community,
Please let me know if there is an R data set with time to multiple outcomes
(unordered failure events of different types).
I am specifically looking for non-competing risks so that I can have observed
times for both outcomes. Twin data or recurrent data will not work for me
b
All your questions are answered by the knitr book in my first reply,
which introduces knitr in a systematic manner. For the web pages, I
have tried my best, and nobody can make everybody happy. I do not
understand why you do not understand Rnw and markdown, and I do not
quite believe a person who u
Hi Mike,
As long as you have access to some user folder, you can download a
non-install version of RStudio.
Go to the page http://www.rstudio.com/ide/download/desktop and select "Show
zip/tarball downloads", download, extract, and run.
Do believe Yihui that running an example using RStudio saves yo
Hi,
@Yihui
When I am using a public computer, say university computer lab or
financial company. I do not have control what to install.
I'm also very happy with R editor on OS X, it integrates with Mac
well. As for my Mac Air, I am keeping installation to the minimal.
There are a lot links on yo
Hi Mike,
if you browse the folders, you find always the Rscript binary (the executable)
under /Library/Frameworks/R.framework/Versions/.../Resources/Rscript.
Do not forget to give your tex file the extension .Rnw! Then surround each
Rcode with <>= Here your r code as you do it in the R shell .
I recommend RStudio not because I want to promote it in any sense, but
because of the fact that it has the best support for Rnw/knitr at the
moment, and it will save you a lot of headache to get started. It
seems you just do not believe me, and insist on going through all the
low-level configuratio
On 18-07-2013, at 22:22, C W wrote:
> Thanks, Simon. I would never figured it out!
>
> I apologize if I sound frustrated, because I am.
>
> @package author: you have a great package, but I think a lot of the
> directions are hand waving. For the newbies, this leads to more
> confusion.
>
>
Thanks, Simon. I would never figured it out!
I apologize if I sound frustrated, because I am.
@package author: you have a great package, but I think a lot of the
directions are hand waving. For the newbies, this leads to more
confusion.
@Berend: I am using OS X.
Mike
On Thu, Jul 18, 2013 at
On 18-07-2013, at 22:09, C W wrote:
> http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165
>
> In step 3: "add the executable file (step 3)".
>
> What is the executable file? Locate package knitr directory path in R?
>
>From the window: Executable ==> Program. So th
The executable is in case of knitr always Rscript.
On a mac it is simply Rscript on windows it is Rscript.exe. This should be on
your PATH. If you are not sure, open the Mac Terminal and type Rscript
--version. If it does not say "Command not found" all is fine.
Best
Simon
On Jul 18, 2013, at
http://tex.stackexchange.com/questions/85154/knitr-with-texworks/85165#85165
In step 3: "add the executable file (step 3)".
What is the executable file? Locate package knitr directory path in R?
Mike
On Thu, Jul 18, 2013 at 3:56 PM, C W wrote:
> Actually, I see it at the bottom. Sorry!
>
> O
Actually, I see it at the bottom. Sorry!
On Thu, Jul 18, 2013 at 3:44 PM, C W wrote:
> Hi Simon,
> I am on OS X Lion, I have TeXworks, I don't have knitr as an option.
>
> How do I install that into TeXworks? Seems like I have to something
> in terminal?
>
> Mike
>
> On Thu, Jul 18, 2013 at 3:3
Hi Simon,
I am on OS X Lion, I have TeXworks, I don't have knitr as an option.
How do I install that into TeXworks? Seems like I have to something
in terminal?
Mike
On Thu, Jul 18, 2013 at 3:31 PM, Simon Zehnder wrote:
> Hi Mike,
>
> I found my way with this little blog: http://yihui.name/knit
Hi Mike,
I found my way with this little blog: http://yihui.name/knitr/demo/editors/
The .Rnw files are created very well in a Latex editor. Everything else can be
easily googled. The command via knitr::knit2pdf works very fine if you use the
chunks. If you are trying to compile an Rtex file, t
How do you create a .Rnw file, in R or LaTex? I don't think any
tutorial mentions it.
btw, I am very new to the terms like markdown, so I don't understand
"markdown to HTML".
I am reading here http://biostat.mc.vanderbilt.edu/wiki/Main/KnitrHowto
that you need to compile at terminal. I do not k
I'm not sure what your question really is. You do not have to use
RStudio, but it will be much easier to get started with RStudio,
because it does a lot of automatic conversion behind the scenes (e.g.
tex to PDF, markdown to HTML, ...). If you want a "pure" solution
without any text editor support,
Hi everyone,
I am using package knitr, FIRST TIME. I don't have access to RStudio.
Read through Yihui's page, didn't find it helpful. Stuck on terms
Rnw, GFM (GitHub Flavored Markdown). Never used Sweave, so the
reference is not helping.
Is there a simple step-by-step example WITHOUT RStudio?
Try
subset(Dat, AA == "A" | (AA == "B" & BB == "b"))
HTH,
Jorge.-
On Wed, Apr 24, 2013 at 8:21 PM, Christofer Bogaso <
bogaso.christo...@gmail.com> wrote:
> Hello again,
>
> Let say I have following data:
>
> Dat <- structure(list(AA = structure(c(3L, 1L, 2L, 1L, 2L, 3L, 3L, 2L,
> 3L, 1L, 1L,
Hello,
You can easily make of the following a one-liner. Note that the order of
rows is not the same as in your code, so identical() will return FALSE.
idx <- Dat[, 'AA'] == "A" | (Dat[, 'AA'] == "B" & Dat[, 'BB'] == "b")
res2 <- Dat[idx, ]
Hope this helps,
Rui Barradas
Em 24-04-2013 11:2
1 - 100 of 310 matches
Mail list logo