Displaying 20 results from an estimated 20000 matches similar to: "Open windows explorer with specific path using system command"
2011 Oct 04
1
texi2dvi problem when compiling incorrect Latex code
Hello,
I am working on a big R project using Eclipse/StatET/Texlipse. I'd like to
write a Latex document within that project but DO NOT want to Sweave it.
It's pure Latex. Via the external tools configurations I set up 2 different
versions to ensure that my latex document is processed correctly.
Version 1 (System Call):
library(tools)
setwd("${container_loc}")
file =
2011 Nov 26
1
dir.create() does not create directory
Hello,
I am running Windows 7 and R-2.13 in StatET.
When I try to create a directory it does not print any errors but if I check
outside eclipse if it exists or do a refresh in Eclipse the directory is not
been created. The strange thing is that it happens only to some
sub-folders... On the other hand when I use the normal windows explorer in
one of these sub-folders and create a folder it
2011 Oct 13
8
Remove specific rows in a matrix/data.frame
Hi,
imagine the following matrix/data.frame
Letter Number
a 1
a 1
b 1
b 0
c 0
c 1
d 0
d 0
If the numbers for two identical letters are also identical then I want to
remove either the first or the
second row of that letter. If for a letter the numbers are 1 and 0 I want to
remove the row with the 0.
That means if the code works I would and up with the following
matrix/data.frame
Letter
2011 Aug 23
3
R system command does not work with objects/variables
Hello!
with the R system command I would like to call a perl script which needs an
input directory and an output directory in form of a path. When I put in the
path directly it works. The script line looks as follows:
system("perl '../path1' '../path2' '../path3'")
If I store the path in a variable/object and call the perl script again it
does not run and I
2011 Oct 13
3
Create order of numbers based on a given vector
Hello!
If I have a vector vec <- c(FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE
FALSE)
I can I create the following order of numbers based on vector vec:
1, 2, 2, 3, 3, 3, 4, 5
Whenever there is a FALSE I increase the number (starting with 1).
Whenever there is a TRUE I set the same number as the previous FALSE has
been assigned to.
I would be happy for any input
Cheers,
Syrvn
--
View
2011 Oct 16
3
Which function to use: grep, replace, substr etc.?
Hello,
I have a simple question but I don't know which method is best to use for my
problem.
I have the following strings:
str1 <- "My_name_is_peter"
str2 <- "what_is_your_surname_peter"
I would like to apply predefined abbreviations for peter=p and name=n to
both strings
so that the new strings look like the followings:
str1: "My_n_is_p"
str2:
2011 Oct 06
3
Duplicate elements of a vector
Hi,
let's assume I have the following vector a:
1 5 23
How can I use R to duplicate the elements so that my new vector looks like:
1 1 5 5 23 23
Many thanks,
Syrvn
--
View this message in context: http://r.789695.n4.nabble.com/Duplicate-elements-of-a-vector-tp3879561p3879561.html
Sent from the R help mailing list archive at Nabble.com.
2011 Nov 15
2
Extract pattern from string
Hello,
with Sys.time() you get the following string:
"2011-11-15 16:25:55 GMT"
How can I extract the following substrings:
year <- 2011
month <- 11
day_time <- 15_16_25_55
Cheers,
Syrvn
--
View this message in context: http://r.789695.n4.nabble.com/Extract-pattern-from-string-tp4073432p4073432.html
Sent from the R help mailing list archive at Nabble.com.
2010 Sep 03
5
how to get row name of matrix when result is a vector
Hi,
the R code:
a <- matrix(c(1,5,4,3,7,10,34,4,3,8,6,5,12,17,45,3,2,45,46,47,3,4,22,12,21),
nrow=5)
rownames(a) <- c("a","b","c","d","e")
a
a[which(a[,3] < 8), ]
a[which(a[,3] < 6), ]
produces the following output:
> a
[,1] [,2] [,3] [,4] [,5]
a 1 10 6 3 3
b 5 34 5 2 4
c 4 4 12 45 22
d
2011 Sep 29
1
simplest pgfSweave example results in error
Hello,
since 3 days now I try to get pgfSweave running using Eclipse + StatET.
I created a super simple .Rnw file which can be viewed here:
http://www.text-upload.com/read.php?id=147992&c=6441045 test.Rnw
When I use sweave it works perfectly fine but when I use pgfSweave I get an
error.
The R output can be viewed here:
http://www.text-upload.com/read.php?id=147995&c=3804886 R output
2012 Jul 08
3
list.files() find files beginning with a .
Hello,
when I use list.files with recursive = TRUE and all.files = TRUE, R returns
a list of strings/paths.
>From all those strings I want to keep only the ones starting with a .
I tried using grep to achieve that. However, the problem is that because of
the recursive list.files parameter,
for some files beginning with a . there is a path attached. I think it is
not as simple as it looks
2012 Feb 23
2
extract subset of data.frame
Hello,
consider the following data.frame df and vector v
df <- data.frame(group = c("A","B","C","D"), value = c(1,2,3,4))
v <- c(2,3)
How can I return a sub data.frame which has only the rows left where value
matches v
df:
group value
B 2
C 3
Cheers
--
View this message in context:
2011 Nov 19
1
Eclipse StatET - create own code formatting
Hello,
does anybody know whether it is possible to create its own code formatting
rules?
Defining rules under Eclipse -> Preferences -> R Code Formatting is so
limited.
Cheers,
Syrvn
--
View this message in context: http://r.789695.n4.nabble.com/Eclipse-StatET-create-own-code-formatting-tp4086386p4086386.html
Sent from the R help mailing list archive at Nabble.com.
2011 Nov 29
2
Help needed in reproducing a plot
Hello,
can anybody tell me how to produce a plot like the one in
http://cran.r-project.org/web/packages/lme4/vignettes/Implementation.pdf
on page 13, Figure 6?
The data is stored in:
library(nlme)
data(Oats)
Cheers
--
View this message in context: http://r.789695.n4.nabble.com/Help-needed-in-reproducing-a-plot-tp4119603p4119603.html
Sent from the R help mailing list archive at
2010 Jan 29
2
Vectors with equal sd but different slope
Hi,
what I would need are 2 vector pairs (x,y) and (x1,y1). x and x1 must have
the same sd. y and y1 should also exhibit the same sd's but different ones
as x and x1. Plotting x,y and x1,y1 should produce a plot with 2 vectors
having a different slope. Plotting both vector pairs in one plot with fixed
axes should reveal the different slope.
many thanks
syrvn
--
View this message in
2010 Aug 10
2
p-values with pvclust
Hi,
if you look at the first image (Image1) you see that there are 2 main
clusters 7 and 8
I wanted to use pvclust to calculate a p-value whether these clusters are
due to chance
or statistically significant. Unfortunately pvclust does not provide a
p-value for the first
brunch (7 and 8).
So I added a row to my matrix which is very different to the rest of the
data to create an additional
2010 Nov 29
2
Significance of the difference between two correlation coefficients
Hi,
based on the sample size I want to calculate whether to correlation
coefficients are significantly different or not. I know that as a first step
both coefficients
have to be converted to z values using fisher's z transformation. I have
done this already but I dont know how to further proceed from there.
unlike for correlation coefficients I know that the difference for z values
is
2012 Feb 12
3
Vector manipulation
Hello,
I am stuck with the following problem. Consider the vector:
vec <- c(2,4,6,9,10)
I now want to use R to manipulate the vector as follows:
[1] 2, 4, 2, 6, 2, 9, 2, 10
In words, the first element of the vector should be placed in front of each
following number.
Which R commands do I need to achieve that?
Cheers
--
View this message in context:
2011 Jul 13
7
Error when writing to Excel files using the packages xlsx and xlsx2
Dear group,
I am working on a rather big project where the output data frames have
dimensions of 3000 x 15 or greater. We are using xlsx and xlsx2 to write the
data.frames to Excel sheets.
Since recently we get the following error, when trying to write the data
frames to the excel sheets:
Error in ls(envir = envir, all.names = private) :
invalid 'envir' argument
We figured out that
2011 Oct 08
1
Delete files with system command on Windows 7
Under MacOS I use the following script to process my latex documents:
pdflatex -halt-on-error document.tex
bibtex document.aux
pdflatex -halt-on-error document.tex
pdflatex -halt-on-error document.tex
rm *.aux *.bbl *.blg *.log *.nlo *.thm
How can I realise this under Windows 7?
--
View this message in context: