Displaying 20 results from an estimated 3000 matches similar to: "Password-protect R script files"
2013 Apr 11
2
(no subject)
Dear all,
Is there a quick and easy way of converting utf characters to the \uxxxx
form (necessary e.g. for packages)? I mean something working like this:
> utf2uxxxx("õäöü")
[1] "\u00f5\u00e4\u00f6\u00fc"
It is easy to program but perhaps someone already has implemented this. (I
couldn't find anything useful from searches incl RSiteSearch).
Thanks in advance,
Kenn
2011 Mar 03
1
sqlFetch (RODBC) question
Dear all,
I've used RODBC a lot to read in files created in MS excel and access but
found a strange problem today: a variable in my data file contained both
numbers and text; sqlFetch would set text within a row of numbers to NA; but
if first 5 or 6 rows would be text then all numbers would be read in as NA.
con<-odbcConnectExcel("xample.xls") #the file is attached or at
2011 Mar 25
2
Preserving the class of POSIXt objects
Dear all,
I am working with a list of objects each of which contains two POSIXct
objects (say, $Start and $End) and a number of different data in
addition to that. Now an easy way to extract Start times of all object
could be sapply(x, "[", "Start") but this converts them all to
numeric, and so does sapply(x, "[[", "Start"). lapply preserves the
class but
2007 Oct 12
2
Q-type factor analysis
Hallo!
Is there a package in R that does Q-type factor analysis?
I know how to do principal component analysis, but haven't found any application of Q-type factor analysis.
Thx,
Julia
--
Psssst! Schon vom neuen GMX MultiMessenger geh?rt?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
2011 Jun 18
3
how to subtract one string from another in R
Dear R Group
Here is what i am trying to do.. but couldnt figure out how..
string<-"ABC DEFG HIJKLM NOPQ RSTUV WXY"
string1<-substr(string,1,4)
I want to create an R object string 2 ( following the logic shown).. R does
not allow string subtraction.. any suggestions how to achieve this?
string2<-string-string1 (it should now hold "DEFG HIJKLM NOPQ RSTUV WXY"
I
2011 Aug 04
2
random value generation with added constraint.
Hi
I am looking at generating a random dataset of say 100 values fitting in a
normal distribution of a given mean and SD, I am aware of rnorm
function. However i am trying to build into this function one added
constraint that all the random value generated should also obey the
constraint that they only take values between say X to X+25
How do i do this in R?
Any help would be highly appreciated,.
2011 Mar 21
1
Curry with `[.function` ?
Dear all,
I sometimes use the following function:
Curry <- function(FUN,...) {
# by Byron Ellis,
https://stat.ethz.ch/pipermail/r-devel/2007-November/047318.html
.orig <- list(...)
function(...) do.call(FUN,c(.orig,list(...)))
}
... and have thought it might be convenient to have a method for [ doing
this. As a simple example,
> apply(M, 1, mean[trim=0.1]) # hypothetical
2012 Nov 15
3
GUI Development reg
Dear R Group
I have a character vector from which I want to select a few elements and
create a new character vector.
I need a GUI to do this in R Script.
Can someone help?
a<-c("A","B","C","D","E")
## I want to have a GUI in R that will display elements in "object a" as
a drop down list.. from there I want to be able to select a
2012 Feb 27
1
win zip archive of library(HH) for R2.12.0
Dear R Group
Can any body point me to a link from where I can get zip archive of the
package HH for R 2.12.0?
Thanks &
Regards
Vijayan Padmanabhan
"What is expressed without proof can be denied without proof" - Euclide.
Please visit us at www.itcportal.com
******************************************************************************
This Communication is for the exclusive use
2017 Jul 13
2
Help with R script
Using Ulrik?s example data (and assuming I understand what is wanted), here is what I would do:
ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3")
tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE)
sp <- strsplit(tst$x, ':', fixed=TRUE)
chk <-
2010 Sep 22
2
randomForest - partialPlot - Reg
Dear R Group
I had an observation that in some cases, when I use the randomForest model
to create partialPlot in R using the package "randomForest"
the y-axis displays values that are more than -1!
It is a classification problem that i was trying to address.
Any insights as to how the y axis can display value more than -1 for some
variables?
Am i missing something!
Thanks
Regards
2017 Jul 13
2
Help with R script
Dear R-help Group
Scenario 1:
I have a text file running to 1000 of lines...that
is like as follows:
[922] "FieldName: Wk3PackSubMonth"
[923] "FieldValue: Apr"
[924] "FieldName: Wk3PackSubYear"
[925] "FieldValue: 2017"
[926] "FieldName: Wk3Code1"
[927] "FieldValue: "
[928] "FieldValue: K4"
[929] "FieldName:
2011 Apr 02
4
help
Dear R Help group
I need to run a command line script from within R session. I am not clear
how i can acheive this. I tried shell and system function, but i am missing
something critical.can someone provide help?
My intention is to create a pdf file of a plot in R and then attach
existing files from my system as attachment into the newly created pdf file.
Any help would be greatly appreciated..
2011 Feb 02
2
Help me apply mapply
Hello all I would like to ask your help use mapply.
I have a function called findCell that takes two arguments(x,sr)
where x is a vector of size two (e.g x<-c(2,3) and sr is a matrix.
I would like to call many times the findCell function (thus I need mapply) for different x inputs but always for the same sr.
as x is a vector of size two (two cells) I want to pass inside inside the following
2010 Sep 07
1
Help with repeating values in a column of dataframe in R on a random pattern- reg
Dear Group
I have to populate a column in a R dataframe containing say 99 rows, where
for every 3 row one row (randomly determined) of the column should take
the value 1 and the other 2 row of that column should take the value 0.
I used the command
dataframe$new<-rep(sample(c(0,1,0),3,replace=FALSE),99)
This command repeats the same patter of response across the entire
column..
I would
2017 Jul 14
0
Help with R script
@Don your solution does not solve Vijayan's scenario 2. I used spread and
gather for that.
An alternative solution to insert mising Fval - picking up with Don's
newtst - is
newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval:
Fval2.name2", "FName: fname3", "FName: fname4", "Fval: fval4.fname4")
2012 Feb 14
1
help with matrix column cleaning
Dear R Group
I have a matrix object in R, where i want to retain only those columns
which have each row from a different group..
see the example below..
team1<-c("a1","a2","b1","b2","b3","c1","c2")
teams<-combn(team1, 3)
I want a function which will delete all columns in the teams matrix that
have more than 1 row
2011 Apr 08
5
Avoiding a loop
Friends.
I cannot simplify this much, and I think the loop is unavoidable. As a
recovering C programmer I want to avoid loops and in cases like this I
almost allways can by using an apply function. But I suspect in this case
there is nothing I can do.
It is a finance example where a price series is compared to a moving
average. If the price goes above the average, plus a bit, buy the
2011 Jun 04
1
library(SenoMineR)- Triangle Test Query
Dear R Group
I was trying to use the triangle.test function in SensoMineR and strangely i
encounter a error in the output of preference matrix from the analysis.
To illustrate, pl see the following dataframe of a design with the response
and preference collected as shown below:
design<-structure(list(`Product X` = c(3, 1, 4, 2, 4, 2, 1, 3, 4, 2,
4, 2, 1, 3, 4, 2, 4, 2, 3, 1), `Product Y` =
2017 Jul 13
0
Help with R script
Hi Vijayan,
one way going about it *could* be this:
library(dplyr)
library(tidyr)
library(purrr)
ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName:
fname2", "Fval: Fval2.name2", "FName: fname3")
data.frame(x = ex_dat) %>%
separate(x, c("F1", "F2"), sep = ": ") %>%
filter(F2