Displaying 20 results from an estimated 7000 matches similar to: "For each entry type in column?"
2017 Nov 06
4
For each entry type in column?
It?s sometimes faster to ask from someone who has already learnt the syntax.
In this case one has to do e.g.
names(data$somecol)
To get the collection and then iteration through it is almost like in Python:
for(i in names(data$somecol)) {
# do something
}
> Bert Gunter <bgunter.4567 at gmail.com> kirjoitti 6.11.2017 kello 19.55:
>
> Time to go through a tutorial or two! --
2017 Nov 06
2
For each entry type in column?
Matti -
Since you are asking about looping through a column, not looping across columns, it is simply the following:
# Note: data.frame() turns strings into factors by default.
myDF <- data.frame(type = c("a", "j", "a", "a", "j"),
weight = c(12.3, 6.8, 10.5, NA, "5.5"))
myDF$type # ... is a vector of factors
2017 Nov 06
0
For each entry type in column?
Hello,
If you want to loop through the columns of a data.frame you can do
for(i in names(df)){
[code]
}
Another way would be
lapply(names(df), function(somecol) class(df[[somecol]]))
where class(df[[somecol]]) is just an example, you would use whatever
fits your needs.
When you say that the column in question holds "levels" do you mean it's
a factor? (factors are R's
2017 Nov 06
0
For each entry type in column?
Time to go through a tutorial or two! -- This forum cannot replace such
self study.
Your query evidences some basic confusion, but ?tapply or the equivalent
lapply(split(...)) construct are most likely relevant.
Cheers,
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
2017 Nov 06
0
For each entry type in column?
Boris:
"As others have remarked, for added efficiency with large datasets we often
use functions from the apply() family, rather than for-loops."
That is generally false, though it is a common misconception. Apply-type
functions are used to maintain fidelity -- and for some, clarity -- to a
functional programming paradigm.
Cheers,
Bert
Bert Gunter
"The trouble with having an
2006 Apr 01
1
STI with_scope on parent - bug or feature?
Hi,
It seems that setting a with_scope on the parent class doesn''t do anything
MyClass.with_scope(:find=>{:conditions=> ["somecol = ?", ''val'']}) do
@ext_pages, @ext_rows = paginate :my_extended_class, {
:per_page => 13
}
end
# this doesn''t generate WHERE somecol=''val''
In order for scope to work you have to call
2009 Feb 20
1
[PATCH 1/1] ocfs2: set gap to seperate entry and value when xattr in bucket
This patch set a gap (4 bytes) between xattr entry and
name/value when xattr in bucket. This gap use to seperate
entry and name/value when a bucket is full. It had already
been set when xattr in inode/block.
Signed-off-by: Tiger Yang <tiger.yang at oracle.com>
---
fs/ocfs2/xattr.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/fs/ocfs2/xattr.c
2023 Nov 02
1
Linux/Windows Domain Controller
Am 30.10.23 um 13:25 schrieb matti.kaupenjohann via samba:
>
> did nobody before joined a Windows Functional Level 2016 Domain with
> Samba 4.19?
I did, with:
samba-tool domain join example.net DC --realm=example.net --option="ad
dc functional level = 2016" --dns-backend=BIND9_DLZ --backend-store=mdb
-Uadministrator
--
2023 Oct 25
1
Linux/Windows Domain Controller
So. I've builded 4.19.2 from source. building worked fine and I've
configured like the following:
./configure \
?? ?--sbindir=/usr/local/sbin \
?? ?--bindir=/usr/local/bin \
?? ?--sysconfdir=/etc/samba \
?? ?--mandir=/usr/share/man \
?? ?--systemd-install-services \
?? ?--with-systemddir=/lib/systemd/system \
?? ?--enable-selftest \
?? ?--disable-cups
I ran make quicktest with
2001 Nov 27
2
accessing information in data.frame
After reading a data.frame using, such as a <- read.spss("data.sav")
I want to give the column index 'i', or a[i] to a function, which after
some calculation, should print out the results to the standard output.
I am struggling how to access the data itself, as e.g. sum(a[i]) does
not work in this context. In addition I need to know the name of the
variable within the
2023 Oct 19
1
Linux/Windows Domain Controller
Am 18.10.23 um 23:27 schrieb Matti Kaupenjohann via samba:
> Yes I've red this section and the docu is saying no FL above 2008. Might
> be caused by incompleted docu? So far I understand if we don't use >4.19
> we will not be able to use FL 2016 which is necessary since our DC WIN22
> is configured as FL2016?
Yes you MUST usee 4.19 ;-)
>
> On 18.10.23 19:10,
2015 Apr 05
3
Nouveau kernel module exhausting CPU
Hello
I recently switched from Nvidia binary driver to Nouveau. I have encountered a possible bug in the kernel module. Before I file a bug report I would like to know if this is a known issue or not.
I believe it is related to sleep state and power management of the driver.
The Bug:
When the computer is left on it's own to go to a power save mode X takes 100% CPU-time in its thread. A
2013 May 03
1
Race condition in lightdm greeter setup
I came across a race condition in lightdm greeter setup phase before the login screen is displayed (at boot time or after logout).
I reported this also on Launchpad with more details (https://bugs.launchpad.net/lightdm/+bug/1172752), but to work on a proper fix, ideas on how to fix this would be welcome.
During greeter setup "lightdm --session-child" is spawned twice. The first call to
2010 Jul 28
1
How to point a column of dataframe by a "character"
Hello,
Here is a dilemma I am having for a long time. But, I couldn't figure it
out.
I have an vector of Y and a data frame named "data",which contains all Xs. I
tried to be more efficient in fitting a simple linear regression with each
X.
Firstly,
for (i in 1:(dim(data)[2])){
model<-lm(Y~data[,i])
# this is not what I want since the name of coefficient will be data[,i]
# I
2016 Sep 27
4
Inferring nsw/nuw flags for increment/decrement based on relational comparisons
On 2016-09-27 02:28, Philip Reames wrote:
> On 09/20/2016 12:05 PM, Matti Niemenmaa via llvm-dev wrote:
>> I posted some questions related to implementing inference of nsw/nuw
>> flags based on known icmp results to Bug 30428 (
>> https://llvm.org/bugs/show_bug.cgi?id=30428 ) and it was recommended
>> that I engage a wider audience by coming here. The minimal context is
2011 Aug 11
3
vmxnet3 patch for CentOS6 kernel?
Hi,
Could CentOS kernel keepers apply following patch on current kernel?
http://patchwork.ozlabs.org/patch/95785/
(Current as: 2.6.32-71.29.1.el6.x86_64)
With the patch applied, and a ".local" kernel built, I get 30% higher throughput with vmxnet3 in my IP routing node, than when using e1000 "card" at the same. Without the patch, the TCP flow over vmxnet3 driver on a
2023 Oct 18
1
Linux/Windows Domain Controller
Yes I've red this section and the docu is saying no FL above 2008. Might
be caused by incompleted docu? So far I understand if we don't use >4.19
we will not be able to use FL 2016 which is necessary since our DC WIN22
is configured as FL2016?
On 18.10.23 19:10, Stefan Kania via samba wrote:
> If you take a look at:
>
>
2016 Nov 16
3
[PATCH] ssh-pkcs11: allow providing unconditional pin code for PKCS11
Some HSM's such as Safenet Network HSM do not allow searching for keys
unauthenticated. To support such devices provide a mechanism for users
to provide a pin code that is always used to automatically log in to
the HSM when using PKCS11.
The pin code is read from a file specified by the environment variable
SSH_PKCS11_PINFILE if it is set.
Tested against Safenet Network HSM.
---
2016 Sep 20
2
Inferring nsw/nuw flags for increment/decrement based on relational comparisons
Hi everyone,
I posted some questions related to implementing inference of nsw/nuw
flags based on known icmp results to Bug 30428 (
https://llvm.org/bugs/show_bug.cgi?id=30428 ) and it was recommended
that I engage a wider audience by coming here. The minimal context is
the following, please see the bug report for more detail:
> 1. If (X s< Y), then both X + 1 and Y - 1 are nsw.
> 2.
2006 Aug 11
2
LDAP+Samba only posixaccount possible?
Hi!Is it possible to get the samba authenticate a user and map to his homedirectory only using posixaccount or are there some attributes that windows absolutely require like in the samba-objectclasses?Any configuration examples if this is possible.I have been experimenting with pam.d/samba using pam_ldap.so module, but no success so far.Currently I have setup the server so it can authenticate a