Displaying 20 results from an estimated 10000 matches similar to: "Index of Character"
2010 Jul 09
1
Data Frame Manipulation using function
Hi all,
I have a data frame for which I want to limit the output by checking whether
row values for specific column meets particular conditions.
Here are the more specific details:
I have a function that checks whether an input string exists in a defined
list:-
checkBaseLine <- function(s){
for (listItem in WHITELIST){
if(regexpr(as.character(listItem), s)[1] > -1){
return(TRUE)
}
}
2009 Apr 30
1
"--once" getting stuck
RHEL5.3, syslinux 3.75
I tested syslinux "--once" functionality on a vmware image and all was
working as expected, then I tried it on a real system and it failed: it got
"stuck", it had effect at every boot, I could see the cmdline was never
deleted from extlinux.sys.
The vmware image used during testing has a virtual IDE disk (/deb/hda), the
real system has SATA-AHCI
2017 Aug 15
3
migrating 2.1 to 3.x, sql pass scheme, pass value?
On Tue, August 15, 2017 8:03 pm, Sami Ketola wrote:
>
>> On 15 Aug 2017, at 2.50, voytek at sbt.net.au wrote:
>>
>>
>> how do I generate hashed string from my password ?
>
> use this sql command:
>
> GRANT SELECT ON vmail TO ?vmail?@?127.0.0.1? IDENTIFIED BY
> PASSWORD(?yourpassword?);
>
>
> or if you just want to see the hash:
>
> SELECT
2001 Dec 05
2
Detecting numerical value in character variable
I have a variable that can have either numeric or character values.
When numeric, I take one action; when not-numeric, I take another action.
Unfortunately, my approaches are awkward, so I look for others' approaches.
To detect a numeric value, I have semi-successfully used two appoaches.
I somewhat simplify here using direct character values like "123" rather than a variable.
1.
2005 Apr 03
3
is there a function like %in% for characters?
like:
"a" %in% "abcd"
TRUE
Thanks.
2007 Aug 02
4
Finding multiple characters in the same string
Hi
I have this problem where I need to find if there is any numbers in a
string, this is no problem if theres only one number per string. I would
then simply use the regexpr() funtion togheter with the substring function
to extract the number. But regexpr only picks one number per string either
from the beginning or the end, but not multiple. Can this be done? And how
for example
My string <-
2006 Mar 17
1
Autocompleter.Local problem/desparate plea for help...
I have been trying to write a selector function for Autocompleter.Local that
will show a predefined Array and will scroll automatically to the first
match. I have had success with with getting my list to populate and show
all of the choices, however I cannot get it to scroll to the first match.
Since I build the JS Array I can know exactly how many items are in the list
going into my selector,
2009 Jan 02
2
Reading file from remote location or network drive.
Hello,
I'm trying to pull data from a network drive on a windows machine. The
location is read into a string <rem> and then used later with a data
input command.
> rem<- "\\192.192.192.3\Shared\iris1.csv"
Warning messages:
1: '\S' is an unrecognized escape in a character string
2: '\i' is an unrecognized escape in a character string
3: unrecognized
2010 Aug 12
2
Append to csv without header
Hi,
I am writing a function that writes to a csv file for every call.
However, for the subsequent calls, I want to append the data to the existing
csv file without appending the column names again.
I tried searching in the previous posts, but I am stuck with different
errors.
Here is what I am doing (dataF is a data-frame):-
outputFilePath <- paste(getwd(), "/",
2010 Jul 25
1
Left Outer Join 2 DF's on Multiple Conditions
Hi,
I am trying to execute the following SQL statement using two data frames:
tab1, tab2 : Two Tables
Select tab1.*, tab2.*, tab1.tobiiTime - tab2.ruiTime as timeDiff,
IFNULL(n-m, -9999999) as alwaysIncrement
FROM tab1
LEFT OUTER JOIN tab2 On tab1.data1 - tab2.mouseX = 0 And tab1.data2 -
tab2.mouseY = 0
I am trying to do the following in R:-
*#Getting error here:*
data
2010 Jul 22
1
Updating a Data Frame
Hi,
I have a global data-frame in my R script.
At some point in my script, I want to update certain columns of this
data-frame by calling in an update function.
The function looks like this:
# get events data. This populates a global event data frame in the R-script
events <- getEvents(con, eventsFilePath)
# events has columns eventid, timeStamp, isSynchronized, timeDiff; with
millions of
2012 Nov 16
1
Split data frame and create a new column
I need to split a data frame into 3 columns. The column I want to split
contains indices of lag (prefix L1 or L2 and suffix 01, 03, 04), station
name (shown in the sample data as capitalized G, P and S) and pollutant
name. Names with no ?L? prefix or 01/04 suffix are lag 0. Lag 01 is average
of lag 0 and 1, and 04 is average of 0 to 4 days. How can one do that in R?
I will ignore the other
2000 Oct 11
2
invalid regular expression after many grep's (PR#691)
Full_Name: J Utans
Version: 1.1.1
OS: NT4 (SP6)
Submission from: (NULL) (155.140.123.250)
After grep is called many times (> 250k), with constant strings as patterns,
it complains with "invalid regular expression" on calls that worked before
(with same pattern and x). At the same time copying to the clipboard
does no longer work with "out of memory" error (i.e. when trying
2010 Jul 12
1
Comparison of two very large strings
Hi,
I have a function in R that compares two very large strings for about 1
million records.
The strings are very large URLs like:-
http://query.nytimes.com/gst/sitesearch_selector.html?query=US+Visa+Laws&type=nyt&x=25&y=8.
..
or of larger lengths.
The data-frame looks like:-
id url
1
2005 Sep 15
2
Splitting the string at the last sub-string
Hi,
I need to split a string into 2 strings, with the split point defined by the
last occurrence of some substring. I come up with some convoluted code to do
so:
str = "Chance favors the prepared mind"
sub = "e"
y = unlist(strsplit(str,sub))
z = cbind(paste(y[-length(y)], sub, sep="", collapse = ""), y[length(y)]);
y
z
z[1]
z[2]
Is there a simpler way
2010 Jun 18
1
Error: cannot allocate vector of size 31.8 Mb
Hi,
I am getting the following error while trying to run an R script:
Error: cannot allocate vector of size 31.8 Mb
I tried setting up memory.limit(), vsize, etc. but could not make it run.
My computer has following configurations:-
OS: Windows 7
Processor: Intel Core 2 Duo
RAM: 4GB
Thanks in advance,
Harsh Yadav
[[alternative HTML version deleted]]
2010 Jul 20
1
Error using sqldf
Hi,
I am running a query using sqldf() [package : sqldf]. The query is:-
userid <- 5
taskid <- 5
tab1 <- fn$sqldf("SELECT tobiiEvents.data1, tobiiEvents.data2,
events.`timestamp` as tobiiTime
FROM tobiiEvents
INNER JOIN events ON events.eventid = tobiiEvents.eventid
WHERE tobiiEvents.subtype = 'MOUSE' AND tobiiEvents.userid = 5 AND
tobiiEvents.taskid = 5
ORDER BY
2011 Jul 05
2
Stuck ...can't get sapply and xmlTreeParse working
Can't seem to get the code below working. It gets stuck on line 24 inside the
function hm; comments show the line in question. The function hm is called
by sapply and is at the bottom of the code. Other stuff above line 24 works
correctly including the first couple of lines of the function hm. Should I
be using a different apply function or am I doing something wrong with
xmlTreeParse ?
2003 Mar 31
4
Convert char vector to numeric table
I'm a great fan of read.table(), but this time the data had a lot of cruft. So I used readLines() and editted the char vector to eventually get something like this:
" 23.4 1.5 4.2"
" 19.1 2.2 4.1"
and so on. To get that into a 3 col numeric table, I first just used:
writeLines(data,"tempfile")
2004 Mar 24
1
string problems ( grep and regepxr)
Recently working with strings and data
I have found a small problem.
Windows XP
R 1.8.1
Reading data from a "txt file" with readLine.
finding a specific line with "grep" command, all OK.
but here comes the problem...
After finding the correct line(s) i need to find a substring
inside each string.
In this case "tabs" I think it represented by "\t" in the